Text
Validated terminal presentation produced by
term.style
or a Style
or term.preformat.
Nested Text values are flattened when composed. ANSI reset codes in a nested
value restore the enclosing style.
Terminal output functions render Text with ANSI styling when stderr is a
terminal and as plain text otherwise. Converting it with str returns its full
ANSI representation.
Methods
indent spaces
Adds spaces to the beginning of each line without changing ANSI formatting. A terminal newline does not gain a trailing indentation prefix.
Parameters:
| Name | Type | Description |
|---|---|---|
spaces |
Int |
Non-negative number of spaces |
Returns: Text