Struct Finder
pub struct Finder(/* private field */);
A forward substring searcher that uses the Two-Way algorithm.
Implementations
impl Finder
fn new(needle: &[u8]) -> FinderCreate a searcher that finds occurrences of the given
needle.An empty
needleresults in a match at every position in a haystack, including athaystack.len().fn find(&self, haystack: &[u8], needle: &[u8]) -> Option<usize>Returns the first occurrence of
needlein the givenhaystack, orNoneif no such occurrence could be found.The
needlegiven must be the same as theneedleprovided toFinder::new.An empty
needleresults in a match at every position in a haystack, including athaystack.len().
Trait Implementations
impl Clone for Finder
fn clone(&self) -> Self
impl Copy for Finder
impl Debug for Finder
fn fmt(&self, f: &mut Formatter<'_>) -> Result