pub fn match_segs_while<F>(&mut self, pred: F) -> Vec<String>
        where F: Fn(&str) -> bool {
        use std::iter::FromIterator;
        if let Some(false_point) = self.path_segs.iter()
            .position(|x| !pred(x)) {
            Vec::from_iter(self.path_segs.drain(..false_point))
        } else {
            Vec::from_iter(self.path_segs.drain(..))
        }
    }
/// Match all the segments of path while the given condition is satisfied.
/// See `match_seg()`.
Match all the segments of path while the given condition is satisfied.
Match all the segments of path while the given condition is satisfied .
pub fn match_segs_while<F>(&mut self, pred: F) -> Vec<String>
        where F: Fn(&str) -> bool {
        use std::iter::FromIterator;
        if let Some(false_point) = self.path_segs.iter()
            .position(|x| !pred(x)) {
            Vec::from_iter(self.path_segs.drain(..false_point))
        } else {
            Vec::from_iter(self.path_segs.drain(..))
        }
    }
pub fn match_segs_while < F > ( & mut self , pred : F ) -> Vec < String > where F : Fn ( & str ) -> bool { use std :: iter :: FromIterator ; if let Some ( false_point ) = self . path_segs . iter ( ) . position ( | x | ! pred ( x ) ) { Vec :: from_iter ( self . path_segs . drain ( .. false_point ) ) } else { Vec :: from_iter ( self . path_segs . drain ( .. ) ) } }
Match all the segments of path while the given condition is satisfied.
Match all the segments of path while the given condition is satisfied .
&mut self
pred
F
&mut self
pred
F