lut

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2025 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareFold added in v1.0.27

func CompareFold(s, t string) int

CompareFold returns an integer comparing two strings case & width (full/single) insensitive. The result will be 0 if a==b, -1 if a < b, and +1 if a > b.

func HasFullWidth

func HasFullWidth(s string) bool

HasFullWidth checks if the string contains any full-width chars.

func HasHalfWidth

func HasHalfWidth(s string) bool

HasHalfWidth checks if the string contains any unicode half-width chars.

func IsFullWidth

func IsFullWidth(s string) bool

IsFullWidth checks if the string contains full-width chars only.

func IsFullWidthRune

func IsFullWidthRune(c rune) bool

func IsHalfWidth

func IsHalfWidth(s string) bool

IsHalfWidth checks if the string contains half-width chars only.

func IsHalfWidthRune

func IsHalfWidthRune(c rune) bool

IsHalfWidthRune checks if the rune c is unicode half-width char. https://www.asahi-net.or.jp/~ax2s-kmtn/ref/unicode/uff00.html \u0000-\u00FF\uFF61-\uFFDF\uFFE8-\uFFEE

func IsVariableWidth

func IsVariableWidth(s string) bool

IsVariableWidth checks if the string contains a mixture of full and half-width chars.

func ToASCII

func ToASCII(s string) string

ToASCII convert the string from multi byte to single byte ascii

func ToASCIIRune

func ToASCIIRune(c rune) rune

ToASCIIRune convert multi byte rune c to single ascii rune

func ToASCIIs added in v1.0.27

func ToASCIIs(ss []string) []string

ToASCIIs convert all string from multi byte to single byte ascii in the string slice ss.

func ToFullRune

func ToFullRune(c rune) rune

ToFullRune convert single ascii rune c to multi byte rune

func ToFullWidth

func ToFullWidth(s string) string

ToFullWidth convert the string from single ascii to multi ascii

func ToFullWidths added in v1.0.27

func ToFullWidths(ss []string) []string

ToFullWidths convert all string from single ascii to multi ascii in the string slice ss.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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