pub fn truncate_display(s: &str, cells: usize) -> StringExpand description
Truncate s to at most cells terminal columns, marking the cut with an ellipsis.
Returns a string exactly cells columns wide whenever it truncates. A wide
character straddling the boundary is dropped rather than split, which can leave the
result one column short — the trailing space closes that gap, so callers can rely on
the width being exact.