Function find_iter
fn find_iter<'h, 'n, N: 'n + ?Sized + AsRef<[u8]>>(haystack: &'h [u8], needle: &'n N) -> FindIter<'h, 'n>
Returns an iterator over all non-overlapping occurrences of a substring in a haystack.
Complexity
This routine is guaranteed to have worst case linear time complexity
with respect to both the needle and the haystack. That is, this runs
in O(needle.len() + haystack.len()) time.
This routine is also guaranteed to have worst case constant space complexity.
Examples
Basic usage:
use memmem;
let haystack = b"foo bar foo baz foo";
let mut it = find_iter;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;