Skip to main content

visible_width

Function visible_width 

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

Calculate the visible width of a string in terminal columns. Strips ANSI escape codes and counts grapheme cluster widths. Uses a thread-local LRU cache for non-ASCII strings (matching pi).