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 ` representing the ind
(haystack: H, needles: N)
| 1504 | /// An `Option<usize>` representing the index of the first occurrence of any byte not in |
| 1505 | /// `needles` within `haystack`, if found, otherwise `None`. |
| 1506 | pub fn find_byte_not_from<H, N>(haystack: H, needles: N) -> Option<usize> |
| 1507 | where |
| 1508 | H: AsRef<[u8]>, |
| 1509 | N: AsRef<[u8]>, |
| 1510 | { |
| 1511 | find_byteset(haystack, Byteset::from(needles).inverted()) |
| 1512 | } |
| 1513 | |
| 1514 | /// Finds the index of the last character in `haystack` that is not present in `needles`. |
| 1515 | /// Useful for text processing tasks such as trimming trailing characters that belong to |
no test coverage detected
searching dependent graphs…