mirror of
https://github.com/nushell/nushell
synced 2024-12-30 15:03:25 +00:00
4 lines
143 B
Rust
4 lines
143 B
Rust
/// Trim trailing path separator from a string
|
|
pub fn trim_trailing_slash(s: &str) -> &str {
|
|
s.trim_end_matches(std::path::is_separator)
|
|
}
|