Function find_char_from
pub fn find_char_from<H, N>(haystack: H, needles: N) -> Option<usize> ⓘ
Available on crate feature
dep_stringzilla
only.Expand description
Finds the index of the first character in haystack
that is also present in needles
.
This function is particularly useful for parsing and tokenization tasks where a set of
delimiter characters is used.
§Arguments
haystack
: The byte slice to search.needles
: The set of bytes to search for within the haystack.
§Returns
An Option<usize>
representing the index of the first occurrence of any byte from
needles
within haystack
, if found, otherwise None
.