mirror of
https://github.com/nushell/nushell
synced 2025-01-02 16:29:00 +00: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)
|
||
|
}
|