import "github.com/mattn/go-runewidth"
runewidth.go runewidth_posix.go runewidth_table.go
var ( // EastAsianWidth will be set true if the current locale is CJK EastAsianWidth bool // DefaultCondition is a condition in current locale DefaultCondition = &Condition{} )
FillLeft return string filled in left by spaces in w cells
FillRight return string filled in left by spaces in w cells
IsAmbiguousWidth returns whether is ambiguous width or not.
IsEastAsian return true if the current locale is CJK
IsNeutralWidth returns whether is neutral width or not.
RuneWidth returns the number of cells in r. See http://www.unicode.org/reports/tr11/
StringWidth return width as you can see
Truncate return string truncated with w cells
Wrap return string wrapped with w cells
Condition have flag EastAsianWidth whether the current locale is CJK or not.
NewCondition return new instance of Condition which is current locale.
FillLeft return string filled in left by spaces in w cells
FillRight return string filled in left by spaces in w cells
RuneWidth returns the number of cells in r. See http://www.unicode.org/reports/tr11/
StringWidth return width as you can see
Truncate return string truncated with w cells
Wrap return string wrapped with w cells
Package runewidth imports 4 packages (graph) and is imported by 626 packages. Updated 2021-01-11. Refresh now. Tools for package owners.