RichString
Definitions
def bgBlack(x: a): RichString with Formattable[a]
SourceReturns a RichString
with the given text x
on black background.
def bgBlue(x: a): RichString with Formattable[a]
SourceReturns a RichString
with the given text x
on blue background.
def bgCyan(x: a): RichString with Formattable[a]
SourceReturns a RichString
with the given text x
on cyan background.
def bgGreen(x: a): RichString with Formattable[a]
SourceReturns a RichString
with the given text x
on green background.
def bgMagenta(x: a): RichString with Formattable[a]
SourceReturns a RichString
with the given text x
on magenta background.
def bgRed(x: a): RichString with Formattable[a]
SourceReturns a RichString
with the given text x
on red background.
def bgWhite(x: a): RichString with Formattable[a]
SourceReturns a RichString
with the given text x
on white background.
def bgYellow(x: a): RichString with Formattable[a]
SourceReturns a RichString
with the given text x
on yellow background.
def black(x: a): RichString with Formattable[a]
SourceReturns a RichString
with the given text x
in black color.
def blue(x: a): RichString with Formattable[a]
SourceReturns a RichString
with the given text x
in blue color.
def bold(x: a): RichString with Formattable[a]
SourceReturns a RichString
with the given text x
in bold style.
def combine(rs1: RichString, rs2: RichString): RichString
SourceReturns the concatenation of rs1
and rs2
.
The spans from rs1
appear first, followed by the spans from rs2
.
def cyan(x: a): RichString with Formattable[a]
SourceReturns a RichString
with the given text x
in cyan color.
def empty(): RichString
SourceReturns an empty RichString
.
def fromSpan(s: Span): RichString
SourceReturns a RichString
containing the given span s
.
def fromString(s: String): RichString
SourceReturns a RichString
from the given string s
using default colors and no styles.
def green(x: a): RichString with Formattable[a]
SourceReturns a RichString
with the given text x
in green color.
def magenta(x: a): RichString with Formattable[a]
SourceReturns a RichString
with the given text x
in magenta color.
def map(f: Span -> Span, rs: RichString): RichString
SourceReturns a RichString
with the function f
applied to every span.
def red(x: a): RichString with Formattable[a]
SourceReturns a RichString
with the given text x
in red color.
def text(x: a): RichString with Formattable[a]
SourceReturns a RichString
with the given text x
using default colors and normal style.
def toAnsiString(rs: RichString): String
SourceReturns the string representation of the RichString
rs
with ANSI escape codes.
The returned string includes ANSI color and style codes for terminal display.
def toString(rs: RichString): String
SourceReturns the plain text representation of the RichString
rs
.
All styling and color information is discarded.
def underline(x: a): RichString with Formattable[a]
SourceReturns a RichString
with the given text x
in underline style.
def white(x: a): RichString with Formattable[a]
SourceReturns a RichString
with the given text x
in white color.
def withBgColor(c: Color, x: a): RichString with Formattable[a]
SourceReturns a RichString
from given text x
with all spans updated to use the given background color c
.
def withColor(c: Color, x: a): RichString with Formattable[a]
SourceReturns a RichString
from given text x
with all spans updated to use the given foreground color c
.
def withStyle(style: Style, x: a): RichString with Formattable[a]
SourceReturns a RichString
from given text x
with the given style
in addition to any other styles it already has.
def yellow(x: a): RichString with Formattable[a]
SourceReturns a RichString
with the given text x
in yellow color.