[][src]Function symbolic_common::shorten_path

pub fn shorten_path(path: &str, length: usize) -> Cow<str>

Trims a path to a given length.

This attempts to not completely destroy the path in the process by trimming off the middle path segments. In the process, this tries to determine whether the path is a Windows or Unix path and handle directory separators accordingly.