Skip to main content

truncate_path

Function truncate_path 

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

Truncate a path to max_width terminal columns, eliding the middle.

The tail is what differs between rows (.next/standalone vs .next/server), so it keeps the larger share and the root stays visible: /Users/zee/…/maliqe-website/.next/standalone.