pub fn truncate(s: &str, length: usize, tail: &str) -> StringExpand description
Truncate s to at most length display columns, appending tail if truncation occurs.
ANSI escape sequences are preserved verbatim and do not count toward the width budget. When length == 0, this function returns an empty string.