package runewidth

Import Path
	github.com/mattn/go-runewidth (on go.dev)

Dependency Relation
	imports 4 packages, and imported by one package


Package-Level Type Names (only one)
/* sort by: | */
Condition have flag EastAsianWidth whether the current locale is CJK or not. EastAsianWidth bool StrictEmojiNeutral bool CreateLUT will create an in-memory lookup table of 557056 bytes for faster operation. This should not be called concurrently with other operations on c. If options in c is changed, CreateLUT should be called again. 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 TruncateLeft cuts w cells from the beginning of the `s`. Wrap return string wrapped with w cells func NewCondition() *Condition var DefaultCondition *Condition
Package-Level Functions (total 12)
CreateLUT will create an in-memory lookup table of 557055 bytes for faster operation. This should not be called concurrently with other operations.
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.
NewCondition return new instance of Condition which is current locale.
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
TruncateLeft cuts w cells from the beginning of the `s`.
Wrap return string wrapped with w cells
Package-Level Variables (total 3)
DefaultCondition is a condition in current locale
EastAsianWidth will be set true if the current locale is CJK
StrictEmojiNeutral should be set false if handle broken fonts