Skip to main content

truncate_left_mode

Function truncate_left_mode 

Source
pub fn truncate_left_mode(
    s: &str,
    length: usize,
    prefix: &str,
    mode: WidthMode,
    eaw_wide: bool,
) -> String
Expand description

Width-mode variant of truncate_left.

mode and eaw_wide control grapheme width calculation. Escape sequences before the cut are retained before prefix so styling can carry into the visible suffix.