fn xbasename(name: &str) -> &str {
    let mut base = name;
    let mut p = base;
    while !p.is_empty() {
        if let Some(stripped) = p.strip_prefix('/') {
            base = stripped;
        }
        p = &p[1..];
    }
    base
}
/* Return NAME with any leading path stripped off.  This returns a
pointer into NAME.  For example, `basename ("/foo/bar.baz")'
returns "bar.baz".  */
Return NAME with any leading path stripped off.  This returns a
pointer into NAME.
Return NAME with any leading path stripped off . This returns a pointer into NAME .
fn xbasename(name: &str) -> &str {
    let mut base = name;
    let mut p = base;
    while !p.is_empty() {
        if let Some(stripped) = p.strip_prefix('/') {
            base = stripped;
        }
        p = &p[1..];
    }
    base
}
fn xbasename ( name : & str ) -> & str { let mut base = name ; let mut p = base ; while ! p . is_empty ( ) { if let Some ( stripped ) = p . strip_prefix ( '/' ) { base = stripped ; } p = & p [ 1 .. ] ; } base }
Return NAME with any leading path stripped off.
Return NAME with any leading path stripped off .
name
&str