Documentation ¶
Index ¶
- Variables
- 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
- type EscapeCodeParser
- type WCWidthIterator
Constants ¶
This section is empty.
Variables ¶
View Source
var UnicodeDatabaseVersion [3]int = [3]int{16, 0, 0}
Functions ¶
func IsEmojiPresentationBase ¶
func IsFlagCodepoint ¶
func IsFlagPair ¶
func Stringwidth ¶
func StripEscapeCodes ¶
func TruncateToVisualLength ¶
Types ¶
type CellIterator ¶
type CellIterator struct {
// contains filtered or unexported fields
}
func NewCellIterator ¶
func NewCellIterator(text string) *CellIterator
func (*CellIterator) Backward ¶
func (self *CellIterator) Backward() (has_more bool)
func (*CellIterator) Current ¶
func (self *CellIterator) Current() string
func (*CellIterator) Forward ¶
func (self *CellIterator) Forward() (has_more bool)
func (*CellIterator) GotoEnd ¶
func (self *CellIterator) GotoEnd() *CellIterator
func (*CellIterator) GotoStart ¶
func (self *CellIterator) GotoStart() *CellIterator
type EscapeCodeParser ¶
type EscapeCodeParser struct { ReplaceInvalidUtf8Bytes bool // Callbacks HandleRune func(rune) error HandleEndOfBracketedPaste func() error HandleCSI func([]byte) error HandleOSC func([]byte) error HandleDCS func([]byte) error HandlePM func([]byte) error HandleSOS func([]byte) error HandleAPC func([]byte) error // contains filtered or unexported fields }
func (*EscapeCodeParser) InBracketedPaste ¶
func (self *EscapeCodeParser) InBracketedPaste() bool
func (*EscapeCodeParser) Parse ¶
func (self *EscapeCodeParser) Parse(data []byte) error
func (*EscapeCodeParser) ParseByte ¶
func (self *EscapeCodeParser) ParseByte(b byte) error
func (*EscapeCodeParser) ParseString ¶
func (self *EscapeCodeParser) ParseString(s string) error
func (*EscapeCodeParser) Reset ¶
func (self *EscapeCodeParser) Reset()
type WCWidthIterator ¶
type WCWidthIterator struct {
// contains filtered or unexported fields
}
func CreateWCWidthIterator ¶
func CreateWCWidthIterator() *WCWidthIterator
func (*WCWidthIterator) CurrentWidth ¶
func (self *WCWidthIterator) CurrentWidth() int
func (*WCWidthIterator) Parse ¶
func (self *WCWidthIterator) Parse(b []byte) (ans int)
func (*WCWidthIterator) ParseByte ¶
func (self *WCWidthIterator) ParseByte(b byte) (ans int)
func (*WCWidthIterator) Reset ¶
func (self *WCWidthIterator) Reset()
Click to show internal directories.
Click to hide internal directories.