mirror of
https://github.com/nushell/nushell.git
synced 2025-02-03 20:19:53 +01:00
5 lines
143 B
Rust
5 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)
|
|
}
|