ui/widgets/display/text library

Classes

Text
A widget that renders styled text with optional wrapping.
TextElement
An element that represents a Text widget.

Enums

TextAlign
Text alignments for TUI rendering.

Functions

measureStringWidth(String text) int
Measures the physical cell width of a string in a terminal, correctly accounting for CJK and Emoji characters that occupy 2 cells.
padOrTruncate(String text, int width) String
Pads or truncates a string to match the specified visual column width in a terminal, correctly accounting for wide characters (CJK and Emoji) and utilizing a fast-path for pure ASCII text.