Modules§
Functions§
- escape_
xml - Escape text for XML element content.
- grapheme_
width - Display width of one grapheme cluster in terminal columns.
- home_
dir - Return the current user’s home directory from common platform env vars.
- ratio_
of - Compute
floor(value * ratio)without floating-point drift on whole tokens. - scope_
depth - Depth of a scope:
.= 0,src= 1,src/core= 2. - text_
width - Display width of a string in terminal columns.
- truncate_
ellipsis - Truncate a string to
max_widthterminal columns, appending…if truncated. - truncate_
ellipsis_ start - Truncate from the start (keeping the end), prefixing
…if truncated. - truncate_
line - Truncate a string to
MAX_LINE_LENchars, adding...if truncated.