Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // EastAsianWidth will be set true if the current locale is CJK EastAsianWidth bool // StrictEmojiNeutral should be set false if handle broken fonts StrictEmojiNeutral bool = true // DefaultCondition is a condition in current locale DefaultCondition = &Condition{ EastAsianWidth: false, StrictEmojiNeutral: true, } )
Functions ¶
Types ¶
type Condition ¶
type Condition struct { EastAsianWidth bool StrictEmojiNeutral bool // contains filtered or unexported fields }
Condition have flag EastAsianWidth whether the current locale is CJK or not.
func NewCondition ¶
func NewCondition() *Condition
NewCondition return new instance of Condition which is current locale.
func (*Condition) CreateLUT ¶
func (c *Condition) CreateLUT()
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.
func (*Condition) RuneWidth ¶
RuneWidth returns the number of cells in r. See http://www.unicode.org/reports/tr11/
func (*Condition) StringWidth ¶
StringWidth return width as you can see
Click to show internal directories.
Click to hide internal directories.