[][src]Function libanu::path::pop

pub fn pop(path: &mut String)

Pop the last component off an existing path.

This example is not tested
use libanu::path::pop;
let mut s = "a/b/c".to_string();
pop(&mut s);
assert_eq!(s, "a/b");
pop(&mut s);
assert_eq!(s, "a");
pop(&mut s);
assert_eq!(s, "");