Documentation
¶
Index ¶
- func AsUint16(val int) uint16
- func NormalizeRunes(runes []rune) []rune
- func RunesWidth(runes []rune, prefixWidth int, tabstop int, limit int) (int, int)
- func StringWidth(s string) int
- type Chars
- func (chars *Chars) Bytes() []byte
- func (chars *Chars) CopyRunes(dest []rune, from int)
- func (chars *Chars) Get(i int) rune
- func (chars *Chars) IsBytes() bool
- func (chars *Chars) LeadingWhitespaces() int
- func (chars *Chars) Length() int
- func (chars *Chars) Lines(multiLine bool, maxLines int, wrapCols int, wrapSignWidth int, tabstop int) ([][]rune, bool)
- func (chars *Chars) NumLines(atMost int) (int, bool)
- func (chars *Chars) Prepend(prefix string)
- func (chars *Chars) SliceRight(last int)
- func (chars *Chars) ToRunes() []rune
- func (chars *Chars) ToString() string
- func (chars *Chars) TrailingWhitespaces() int
- func (chars *Chars) TrimLength() uint16
- func (chars *Chars) TrimSuffix(runes []rune)
- func (chars *Chars) TrimTrailingWhitespaces()
- type Match
- type Result
- type Slab
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeRunes ¶
NormalizeRunes normalizes latin script letters
func RunesWidth ¶
RunesWidth returns runes width
func StringWidth ¶
StringWidth returns string width where each CR/LF character takes 1 column
Types ¶
type Chars ¶
type Chars struct {
// XXX Piggybacking item index here is a horrible idea. But I'm trying to
// minimize the memory footprint by not wasting padded spaces.
Index int32
// contains filtered or unexported fields
}
func RunesToChars ¶
func (*Chars) LeadingWhitespaces ¶
func (*Chars) SliceRight ¶
func (*Chars) TrailingWhitespaces ¶
func (*Chars) TrimLength ¶
TrimLength returns the length after trimming leading and trailing whitespaces
func (*Chars) TrimSuffix ¶
func (*Chars) TrimTrailingWhitespaces ¶
func (chars *Chars) TrimTrailingWhitespaces()
Click to show internal directories.
Click to hide internal directories.