Copyright © 2018-2019 Pivotal Software, Inc.
Authors: The RabbitMQ team.
compute_text_block_size/1 | Computes the size of the rectangle which contains the given list of lines. |
expand_tabs/1 | Expands tab characters to spaces. |
isatty/0 |
Guesses if stdout it a TTY which handles colors and line drawing. |
merge_inherited_props/1 | Prepares the properties map to pass to the child terms. |
set_default_props/3 | Fills the initial properties map with default and inherited values. |
split_lines/1 | Splits a text into a list of lines. |
compute_text_block_size(Lines::[unicode:chardata()]) -> {ColumnsCount::non_neg_integer(), RowsCount::non_neg_integer()}
Lines: List of text lines.
returns: the columns and rows count of the rectangle containing the lines.
Computes the size of the rectangle which contains the given list of lines.
The size is returned as the number of columns and rows.expand_tabs(Line::unicode:chardata()) -> unicode:chardata()
Line: Line of text to expand.
returns: the same line with tab characters expanded.
Expands tab characters to spaces.
Tab characters are replaced by spaces so that the content is aligned on 8-column boundaries.isatty() -> boolean()
returns: true
if it is a TTY, false
otherwise.
Guesses if stdout
it a TTY which handles colors and line drawing.
Really it only checks if $TERM
is defined, so it is incorrect
at best. And even if it is set, we have no idea if it has the
appropriate capabilities.
merge_inherited_props(Props::map()) -> map()
Props: Current term's properties map.
returns: the computed inherited properties map to pass to child terms.
Prepares the properties map to pass to the child terms.
The current term's properties are merged with the inherited
properties map it initially received (as stored in the inherited
key), the current term's properties having precedence.
set_default_props(Props::map(), Defaults::map(), InheritedProps::map()) -> map()
Props: Initial properties map.
Defaults: Default properties map.
InheritedProps: Inherited properties map.
returns: the completed properties map.
Fills the initial properties map with default and inherited values.
For each property, the value comes from the first source which provides one, with the following order of precedence:inherited
key
which contains the inherited properties map.
split_lines(Text::unicode:chardata()) -> [unicode:chardata()]
Text: Text to split into lines.
returns: the list of lines.
Splits a text into a list of lines.
Generated by EDoc