memchr2

Function memchr2 

Source
pub fn memchr2(
    needle1: u8,
    needle2: u8,
    haystack: &[u8],
    offset: usize,
) -> usize
Expand description

memchr, but with two needles.

Returns the index of the first occurrence of either needle in the haystack. If no needle is found, haystack.len() is returned. offset specifies the index to start searching from.