Documentation
¶
Index ¶
- func CompareFold(s, t string) int
- func HasFullWidth(s string) bool
- func HasHalfWidth(s string) bool
- func IsFullWidth(s string) bool
- func IsFullWidthRune(c rune) bool
- func IsHalfWidth(s string) bool
- func IsHalfWidthRune(c rune) bool
- func IsVariableWidth(s string) bool
- func ToASCII(s string) string
- func ToASCIIRune(c rune) rune
- func ToASCIIs(ss []string) []string
- func ToFullRune(c rune) rune
- func ToFullWidth(s string) string
- func ToFullWidths(ss []string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareFold ¶ added in v1.0.27
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 ¶
HasFullWidth checks if the string contains any full-width chars.
func HasHalfWidth ¶
HasHalfWidth checks if the string contains any unicode half-width chars.
func IsFullWidth ¶
IsFullWidth checks if the string contains full-width chars only.
func IsFullWidthRune ¶
func IsHalfWidth ¶
IsHalfWidth checks if the string contains half-width chars only.
func IsHalfWidthRune ¶
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 ¶
IsVariableWidth checks if the string contains a mixture of full and half-width chars.
func ToASCIIRune ¶
ToASCIIRune convert multi byte rune c to single ascii rune
func ToASCIIs ¶ added in v1.0.27
ToASCIIs convert all string from multi byte to single byte ascii in the string slice ss.
func ToFullRune ¶
ToFullRune convert single ascii rune c to multi byte rune
func ToFullWidth ¶
ToFullWidth convert the string from single ascii to multi ascii
func ToFullWidths ¶ added in v1.0.27
ToFullWidths convert all string from single ascii to multi ascii in the string slice ss.
Types ¶
This section is empty.