Skip to content

TerminalTextFormatting

[Source]

Defines convenient helper functions for visually formatting text/string-able content.

trait ref TerminalTextFormatting

Public Functions

hide

[Source]

Return the value as an escape-styled "concealed" string ready for the terminal.

fun box hide(
  value: Stringable val)
: String val

Parameters

Returns


conceal

[Source]

Return the value as an escape-styled "concealed" string ready for the terminal.

fun box conceal(
  value: Stringable val)
: String val

Parameters

Returns


bold

[Source]

Return the value as an escape-styled "bold" string ready for the terminal.

fun box bold(
  value: Stringable val)
: String val

Parameters

Returns


faint

[Source]

Return the value as an escape-styled "faint" (dim) string ready for the terminal.

fun box faint(
  value: Stringable val)
: String val

Parameters

Returns


invert

[Source]

Return the value as an escape-styled string with foreground and background color inverted and ready for the terminal.

fun box invert(
  value: Stringable val)
: String val

Parameters

Returns


italics

[Source]

Return the value as an escape-styled "italicized" string ready for the terminal.

fun box italics(
  value: Stringable val)
: String val

Parameters

Returns


underline

[Source]

Return the value as an escape-styled "underlined" string ready for the terminal.

fun box underline(
  value: Stringable val)
: String val

Parameters

Returns


strikeout

[Source]

Return the value as an escape-styled "struck out" string ready for the terminal.

fun box strikeout(
  value: Stringable val)
: String val

Parameters

Returns


color

[Source]

Return the value escaped by 8-bit colour codes for foreground and (optional) background colours.

fun box color(
  value: Stringable val,
  fg: U8 val,
  bg: (None val | U8 val) = reference)
: String val

Parameters

Returns


color_with

[Source]

Return the value surrounded by supplied escape codes for foreground and (optional) background colours.

fun box color_with(
  value: Stringable val,
  fg: String val,
  bg: (None val | String val) = reference)
: String val

Parameters

Returns