Skip to main content

truncate_path

Function truncate_path 

Source
pub fn truncate_path(path: &str, max_len: usize) -> String
Expand description

Truncate a path for display, replacing the beginning with “…” if too long.

Used by many ranked-list formatters to keep tabular output aligned.