Documentation ¶
Overview ¶
Package transutil provides some utility transform.Transformer's to go along with the golang.org/x/text/transform package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Group ¶
func Group(size int, separator string) transform.Transformer
Group returns a transform.Transformer that groups letter and digit characters into groups of the specified size with the specified separator. Input that is non-letters and non-digits (according to unicode.IsLeter and unicode.IsDigit) are dropped. The separator must be no larger then the buffer used during transform processing.
func MapFunc ¶
func MapFunc(mapping func(r rune) rune) transform.Transformer
MapFunc returns a transform.Transformer that modifies all characters according to the mapping function. If mapping returns a negative value, the character is dropped with no replacement.
Types ¶
This section is empty.
Notes ¶
Bugs ¶
Group does not count Unicode combining characters correctly and can split them.