Documentation ¶
Overview ¶
Package tstring contains a string type that stores style data for each character, allowing it to be rendered to a tcell screen essentially unmodified.
Index ¶
- type Cell
- type TString
- func (str TString) AdjustStyle(from, length int, fn func(tcell.Style) tcell.Style)
- func (str TString) AdjustStyleFull(fn func(tcell.Style) tcell.Style)
- func (str TString) Append(data string) TString
- func (str TString) AppendColor(data string, color tcell.Color) TString
- func (str TString) AppendCustom(data string, cellCreator func(rune) Cell) TString
- func (str TString) AppendStyle(data string, style tcell.Style) TString
- func (str TString) AppendTString(dataList ...TString) TString
- func (str TString) Clone() TString
- func (str TString) Colorize(from, length int, color tcell.Color)
- func (str TString) Count(r rune) (counter int)
- func (str TString) Draw(screen mauview.Screen, x, y int)
- func (str TString) Index(r rune) int
- func (str TString) IndexFrom(r rune, from int) int
- func (str TString) Prepend(data string) TString
- func (str TString) PrependColor(data string, color tcell.Color) TString
- func (str TString) PrependCustom(data string, cellCreator func(rune) Cell) TString
- func (str TString) PrependStyle(data string, style tcell.Style) TString
- func (str TString) PrependTString(data TString) TString
- func (str TString) RuneWidth() (width int)
- func (str TString) Split(sep rune) []TString
- func (str TString) String() string
- func (str TString) Trim(fn func(rune) bool) TString
- func (str TString) TrimLeft(fn func(rune) bool) TString
- func (str TString) TrimRight(fn func(rune) bool) TString
- func (str TString) TrimSpace() TString
- func (str TString) Truncate(w int) TString
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TString ¶
type TString []Cell
func NewBlankTString ¶
func NewBlankTString() TString
func NewTString ¶
func (TString) AdjustStyle ¶
func (TString) AdjustStyleFull ¶
func (TString) AppendCustom ¶
func (TString) AppendTString ¶
func (TString) PrependColor ¶
func (TString) PrependCustom ¶
func (TString) PrependStyle ¶
func (TString) PrependTString ¶
Click to show internal directories.
Click to hide internal directories.