Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyStyle ¶
Applies a style to a string. Any currently applied styles will not be overwritten
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
A Parser parses a string into a RuneBuffer
func (*Parser) Parse ¶
func (p *Parser) Parse(s string) *RuneBuffer
Parses a styled string into a RuneBuffer
type RuneBuffer ¶
type RuneBuffer struct {
// contains filtered or unexported fields
}
RuneBuffer is a buffer of runes styled with tcell.Style objects
func (*RuneBuffer) Len ¶
func (rb *RuneBuffer) Len() int
func (*RuneBuffer) Runes ¶
func (rb *RuneBuffer) Runes() []*StyledRune
Returns the internal slice of styled runes
func (*RuneBuffer) String ¶
func (rb *RuneBuffer) String() string
String outputs a styled-string using TERM=xterm-256color
func (*RuneBuffer) Write ¶
func (rb *RuneBuffer) Write(r rune, style tcell.Style)
Write writes a rune and it's associated style to the RuneBuffer
type StyledRune ¶
StyledRune is a rune and it's associated style. The rune has already been measured using go-runewidth
Click to show internal directories.
Click to hide internal directories.