mux.text

mux.text provides validation, styling, measurement, and truncation helpers for styled text.

Functions

FunctionDescription
is_printable_asciiTests whether a string contains only printable ASCII bytes.
markupValidates styled-text markup.
strip_styleRemoves markup and ANSI styling.
styleApplies styles described by an options table.
truncateTruncates styled text to a visible width.
widthReturns the visible byte width of styled text.

See Styled Text for an overview of the markup format and supported presentation features.