nu_path

Function strip_trailing_slash

Source
pub fn strip_trailing_slash(path: &Path) -> Cow<'_, Path>
Expand description

Strip any trailing slashes from a non-root path. This is required in some contexts, for example for the PWD environment variable.