Module branchless::core::formatting [−][src]
Expand description
Formatting and output helpers.
We try to handle both textual output and interactive output (output to a “TTY”). In the case of interactive output, we render with prettier non-ASCII characters and with colors, using shell-specific escape codes.
Structs
Glyphs to use for rendering the smartlog.
Pluralize a quantity, as appropriate. Example:
Helper to build StyledString
s by combining multiple strings (both regular
String
s and StyledString
s).
Functions
Write the provided string to out
, using ANSI escape codfes as necessary to
style it.
Set the provided effect to all the internal spans of the styled string.