Creates a ANSI string.
The starting column for this string (negative values are replaced by zero)
The initial number of line feeds (non-positive values are ignored)
True if the string should be right-aligned to the terminal width
The default style to use (defaults to none)
The default style to use (defaults to none)
The starting column for this string (negative values are replaced by zero)
True if the string should be right-aligned to the terminal width
The number of internal strings
Sets a flag to merge the next word with the last word.
The flag value
The mergeLeft flag value
The list of internal strings without control sequences
The list of internal strings with control sequences
The combined length including spaces (but with no wrapping)
Appends a text.
The text with no control sequences
The text with possible control sequences
True if the text should be merged with the previous string, if any
The ANSI string instance
Appends line breaks.
The number of line breaks to insert (non-positive values are ignored)
The ANSI string instance
Removes all strings.
The ANSI string instance
Closes with a word.
The word to insert (should contain no styles)
The ANSI string instance
Formats a text from a custom phrase with a set of arguments.
The message phrase
The formatting flags
The message arguments
The ANSI string instance
Opens with a word.
The word to insert (should contain no styles)
The ANSI string instance
Prepends text to the string at a specific position. This can only be done if the affected string does not contain opening styles.
The opening text
The position of the previously added string
The ANSI string instance
Appends another ANSI string.
The other ANSI string
The ANSI string instance
Splits a text into words and style sequences, and appends them.
The text to be split
Optional
format: FormatCallback<string>An optional callback to process placeholders
The ANSI string instance
Appends a word.
The word to insert (should contain no styles)
Optional
sty: StyleThe style to be applied
The ANSI string instance
Wraps the internal strings to fit in a terminal width.
The resulting strings to append to
The current terminal column
The desired terminal width (or zero to avoid wrapping)
True if styles should be emitted
True if spaces should be emitted instead of move sequences
The updated terminal column
Implements concatenation of strings that can be printed on a terminal.