Versions in this module Expand all Collapse all v0 v0.2.0 Dec 31, 2024 Changes in this version + var UnicodeDatabaseVersion [3]int = [3]int + func IsEmojiPresentationBase(code rune) bool + func IsFlagCodepoint(ch rune) bool + func IsFlagPair(a rune, b rune) bool + func Runewidth(code rune) int + func Stringwidth(text string) int + func StripEscapeCodes(text string) string + func TruncateToVisualLength(text string, length int) string + func TruncateToVisualLengthWithWidth(text string, length int) (truncated string, width_of_truncated int) + type CellIterator struct + func NewCellIterator(text string) *CellIterator + func (self *CellIterator) Backward() (has_more bool) + func (self *CellIterator) Current() string + func (self *CellIterator) Forward() (has_more bool) + func (self *CellIterator) GotoEnd() *CellIterator + func (self *CellIterator) GotoStart() *CellIterator + type EscapeCodeParser struct + HandleAPC func([]byte) error + HandleCSI func([]byte) error + HandleDCS func([]byte) error + HandleEndOfBracketedPaste func() error + HandleOSC func([]byte) error + HandlePM func([]byte) error + HandleRune func(rune) error + HandleSOS func([]byte) error + ReplaceInvalidUtf8Bytes bool + func (self *EscapeCodeParser) InBracketedPaste() bool + func (self *EscapeCodeParser) Parse(data []byte) error + func (self *EscapeCodeParser) ParseByte(b byte) error + func (self *EscapeCodeParser) ParseString(s string) error + func (self *EscapeCodeParser) Reset() + type WCWidthIterator struct + func CreateWCWidthIterator() *WCWidthIterator + func (self *WCWidthIterator) CurrentWidth() int + func (self *WCWidthIterator) Parse(b []byte) (ans int) + func (self *WCWidthIterator) ParseByte(b byte) (ans int) + func (self *WCWidthIterator) Reset()