devela::_dep::stringzilla::sz

Function find_char_not_from

pub fn find_char_not_from<H, N>(haystack: H, needles: N) -> Option<usize> 
where H: AsRef<[u8]>, N: AsRef<[u8]>,
Available on crate feature dep_stringzilla only.
Expand description

Finds the index of the first character in haystack that is not present in needles. This function is useful for skipping over a known set of characters and finding the first character that does not belong to that set.

§Arguments

  • haystack: The byte slice to search.
  • needles: The set of bytes that should not be matched within the haystack.

§Returns

An Option<usize> representing the index of the first occurrence of any byte not in needles within haystack, if found, otherwise None.