Trait subslice::SubsliceExt [−][src]
pub trait SubsliceExt: Sealed { fn find(&self, other: &Self) -> Option<usize>; fn rfind(&self, other: &Self) -> Option<usize>; }
Expand description
Trait of types which can be searched for subsequences
Required methods
Find the first subslice of self
which is equal to other
, and return the index of its
start.
O(self.len() + other.len()
) time