blob: c281db27684548a2b0f5e00dec6602685e51de33 (
plain)
1
2
3
4
5
6
7
8
|
//! Utility functions, only pathname handling at the moment.
pub fn basename(f: &str) -> &str {
match f.rfind(|c| c == '/' || c == '\\') {
None => f,
Some(index) => &f[(index + 1)..],
}
}
|