Function rfind_char_not_from
pub fn rfind_char_not_from<H, N>(haystack: H, needles: N) -> Option<usize> ⓘ
Available on crate feature
dep_stringzilla
only.Expand description
Finds the index of the last character in haystack
that is not present in needles
.
Useful for text processing tasks such as trimming trailing characters that belong to
a specified 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 last occurrence of any byte not in
needles
within haystack
, if found, otherwise None
.