Expand description
Single-line column-clipping, unicode-width aware.
For word-wrapping multi-line text, see retroglyph_core::layout::TextLayout
(behind the egc feature) rather than reimplementing wrapping here: it
already handles grapheme clusters, hard newlines, and per-span styling.
Functions§
- draw_
clipped - Truncate
texttowidthcolumns, align it within those columns peralign, and print it intosurfaceatat. Returns the printed text’s display width in columns. - truncate
- Truncate
sso its display width is at mostmax_colsterminal columns. - truncate_
owned - Owned variant of
truncate: truncatestomax_colsdisplay columns and copy the surviving prefix into a newString.