• Home
  • Raw
  • Download

Lines Matching refs:haystack

29         pub(crate) fn oneshot(haystack: &str, needle: &str) -> bool {  in oneshot()
30 memmem::find(haystack.as_bytes(), needle.as_bytes()).is_some() in oneshot()
41 haystack: &'a str, in oneshotiter()
44 memmem::find_iter(haystack.as_bytes(), needle.as_bytes()) in oneshotiter()
57 haystack: &'a str, in iter()
59 self.0.find_iter(haystack.as_bytes()) in iter()
67 pub(crate) fn oneshot(haystack: &str, needle: &str) -> bool { in oneshot()
68 memmem::rfind(haystack.as_bytes(), needle.as_bytes()).is_some() in oneshot()
79 haystack: &'a str, in oneshotiter()
82 memmem::rfind_iter(haystack.as_bytes(), needle.as_bytes()) in oneshotiter()
95 haystack: &'a str, in iter()
97 self.0.rfind_iter(haystack.as_bytes()) in iter()
121 pub(crate) fn oneshot(haystack: &str, needle: &str) -> bool { in oneshot()
122 finder(needle.as_bytes()).find(haystack.as_bytes()).is_some() in oneshot()
133 haystack: &'a str, in oneshotiter()
137 haystack.as_bytes(), in oneshotiter()
153 haystack: &'a str, in iter()
155 self.0.find_iter(haystack.as_bytes()) in iter()
171 pub(crate) fn oneshot(haystack: &str, needle: &str) -> bool { in oneshot()
172 finder(needle.as_bytes()).rfind(haystack.as_bytes()).is_some() in oneshot()
183 haystack: &'a str, in oneshotiter()
187 haystack.as_bytes(), in oneshotiter()
203 haystack: &'a str, in iter()
205 self.0.rfind_iter(haystack.as_bytes()) in iter()
222 pub(crate) fn oneshot(haystack: &str, needle: &str) -> bool { in oneshot()
223 bstr::ByteSlice::find(haystack.as_bytes(), needle.as_bytes()) in oneshot()
235 haystack: &'a str, in oneshotiter()
238 bstr::ByteSlice::find_iter(haystack.as_bytes(), needle.as_bytes()) in oneshotiter()
251 haystack: &'a str, in iter()
254 haystack.as_bytes(), in iter()
263 pub(crate) fn oneshot(haystack: &str, needle: &str) -> bool { in oneshot()
264 bstr::ByteSlice::rfind(haystack.as_bytes(), needle.as_bytes()) in oneshot()
276 haystack: &'a str, in oneshotiter()
279 bstr::ByteSlice::rfind_iter(haystack.as_bytes(), needle.as_bytes()) in oneshotiter()
292 haystack: &'a str, in iter()
295 haystack.as_bytes(), in iter()
350 haystack: &'a str, in iter()
352 self.0.find_iter(haystack).map(|m| m.start()) in iter()
396 pub(crate) fn oneshot(haystack: &str, needle: &str) -> bool { in oneshot()
397 haystack.contains(needle) in oneshot()
407 haystack: &'a str, in oneshotiter()
410 haystack.match_indices(needle).map(|(i, _)| i) in oneshotiter()
419 pub(crate) fn oneshot(haystack: &str, needle: &str) -> bool { in oneshot()
420 haystack.contains(needle) in oneshot()
430 haystack: &'a str, in oneshotiter()
433 haystack.rmatch_indices(needle).map(|(i, _)| i) in oneshotiter()
457 pub(crate) fn oneshot(haystack: &str, needle: &str) -> bool { in oneshot()
458 twoway::find_bytes(haystack.as_bytes(), needle.as_bytes()) in oneshot()
469 haystack: &'a str, in oneshotiter()
473 haystack.as_bytes(), in oneshotiter()
485 pub(crate) fn oneshot(haystack: &str, needle: &str) -> bool { in oneshot()
486 twoway::rfind_bytes(haystack.as_bytes(), needle.as_bytes()) in oneshot()
497 haystack: &'a str, in oneshotiter()
501 haystack.as_bytes(), in oneshotiter()
563 pub(crate) fn oneshot(haystack: &str, needle: &str) -> bool { in oneshot()
572 finder.search_in(haystack.as_bytes()) in oneshot()
702 haystack: *const libc::c_void, in memmem()
711 fn find(haystack: &[u8], needle: &[u8]) -> Option<usize> { in find()
714 haystack.as_ptr() as *const libc::c_void, in find()
715 haystack.len(), in find()
723 Some(p as usize - (haystack.as_ptr() as usize)) in find()
727 pub(crate) fn oneshot(haystack: &str, needle: &str) -> bool { in oneshot()
728 find(haystack.as_bytes(), needle.as_bytes()).is_some() in oneshot()
738 haystack: &'a str, in oneshotiter()
742 haystack.as_bytes(), in oneshotiter()
810 haystack: &'a [u8], in iter_from_find()
816 if pos > haystack.len() { in iter_from_find()
819 match find(&haystack[pos..], needle) { in iter_from_find()
833 haystack: &'a [u8], in iter_from_rfind()
837 let mut pos = Some(haystack.len()); in iter_from_rfind()
843 match rfind(&haystack[..end], needle) { in iter_from_rfind()