pub fn strip_prefix(&self, base: &Path) -> Option<Path> {
        let mut components = self.components().into_iter().peekable();
        let mut base_components = base.components().into_iter().peekable();
        while let (Some(a), Some(b)) = (components.peek(), base_components.peek()) {
            if a != b {
                return None;
            }
            components.next();
            base_components.next();
        }
        Some(Path::make(components))
    }
/// Returns a path that joined to `base` would give this path.
/// If base is the same as this path, returns current directory.
/// If this path doesn't have a `base` prefix, returns `None`.
Returns a path that joined to `base` would give this path.
If base is the same as this path, returns current directory.
If this path doesn't have a `base` prefix, returns `None`.
Returns a path that joined to ` base ` would give this path . If base is the same as this path returns current directory . If this path doesn ' t have a ` base ` prefix returns ` None ` .
pub fn strip_prefix(&self, base: &Path) -> Option<Path> {
        let mut components = self.components().into_iter().peekable();
        let mut base_components = base.components().into_iter().peekable();
        while let (Some(a), Some(b)) = (components.peek(), base_components.peek()) {
            if a != b {
                return None;
            }
            components.next();
            base_components.next();
        }
        Some(Path::make(components))
    }
pub fn strip_prefix ( & self , base : & Path ) -> Option < Path > { let mut components = self . components ( ) . into_iter ( ) . peekable ( ) ; let mut base_components = base . components ( ) . into_iter ( ) . peekable ( ) ; while let ( Some ( a ) , Some ( b ) ) = ( components . peek ( ) , base_components . peek ( ) ) { if a != b { return None ; } components . next ( ) ; base_components . next ( ) ; } Some ( Path :: make ( components ) ) }
Returns a path that joined to `base` would give this path.
Returns a path that joined to ` base ` would give this path .
&self
base
&Path
&self
base
&Path