pop

Function pop 

Source
pub fn pop(path: &mut String) -> Option<String>
Expand description

Removes the last component from the path and returns it.

If the path is a root or empty path, this function does nothing and returns None.