Skip to main content

display_width

Function display_width 

Source
pub fn display_width(text: &str) -> usize
Expand description

Width of a string in terminal cells.

Printable ASCII runs take the inline/SIMD fast path (ascii_width); strings containing non-ASCII bytes segment into grapheme clusters and route every non-ASCII cluster (<= 128 bytes) through the per-thread S3-FIFO width cache (grapheme_width).