Expand description
Generic crate-internal routines for the memchr
family of functions.
Structsยง
- Iter ๐An iterator over all occurrences of a set of bytes in a haystack.
- One ๐Finds all occurrences of a single byte in a haystack.
- Three ๐Finds all occurrences of two bytes in a haystack.
- Two ๐Finds all occurrences of two bytes in a haystack.
Functionsยง
- count_byte_by_byte ๐ โPerforms a forward byte-at-a-time loop until
ptr >= end_ptr
and returns the number of timesconfirm(*ptr)
returnstrue
. - fwd_byte_by_byte ๐ โPerforms a forward byte-at-a-time loop until either
ptr >= end_ptr
or untilconfirm(*ptr)
returnstrue
. If the former occurs, thenNone
is returned. If the latter occurs, then the pointer at whichconfirm
returnstrue
is returned. - rev_byte_by_byte ๐ โPerforms a reverse byte-at-a-time loop until either
ptr < start_ptr
or untilconfirm(*ptr)
returnstrue
. If the former occurs, thenNone
is returned. If the latter occurs, then the pointer at whichconfirm
returnstrue
is returned. - search_slice_with_raw ๐ โSearch a slice using a function that operates on raw pointers.