Function stringzilla::sz::find_char_from
source · pub fn find_char_from<H, N>(haystack: H, needles: N) -> Option<usize>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.