Skip to main content

truncate_left

Function truncate_left 

Source
pub fn truncate_left(s: &str, length: usize, prefix: &str) -> String
Expand description

Truncate s from the left until at most length display columns remain.

If truncation occurs, prefix is prepended after any leading escape sequences needed to preserve active terminal state.