Lines Matching defs:find
79 pub fn find(&self, haystack: &[u8]) -> Option<(usize, usize)> {
83 Bytes(ref sset) => sset.find(haystack).map(|i| (i, i + 1)),
84 Memmem(ref s) => s.find(haystack).map(|i| (i, i + s.len())),
86 ac.find(haystack).map(|m| (m.start(), m.end()))
89 s.find(haystack).map(|m| (m.start(), m.end()))
94 /// Like find, except matches must start at index `0`.
107 /// Like find, except matches must end at index `haystack.len()`.
328 /// Faster find that special cases certain sizes to use memchr.
330 fn find(&self, text: &[u8]) -> Option<usize> {
340 /// Generic find that works on any sized set.
375 pub fn find(&self, haystack: &[u8]) -> Option<usize> {
376 self.finder.find(haystack)