package runewidth
Import Path
github.com/mattn/go-runewidth (on go.dev)
Dependency Relation
imports 3 packages, and imported by one package
Package-Level Type Names (total 3, in which 1 are exported)
Condition have flag EastAsianWidth whether the current locale is CJK or not.
EastAsianWidth bool
ZeroWidthJoiner bool
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
(*T) stringWidth(s string) (width int)
(*T) stringWidthZeroJoiner(s string) (width int)
func NewCondition() *Condition
var DefaultCondition *Condition
Package-Level Functions (total 15, in which 10 are exported)
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
Wrap return string wrapped with w cells
Package-Level Variables (total 13, in which 3 are exported)
DefaultCondition is a condition in current locale
EastAsianWidth will be set true if the current locale is CJK
ZeroWidthJoiner is flag to set to use UTR#51 ZWJ
The pages are generated with Golds v0.3.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |