transutil

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2021 License: BSD-2-Clause Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL