Skip to main content

truncate_to_width

Function truncate_to_width 

Source
fn truncate_to_width(s: &str, max_width: usize) -> String
Expand description

Cut s to at most max_width terminal columns, ending in “…” when cut.