Module memchr::arch::generic::memchr

source ยท
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 times confirm(*ptr) returns true.
  • fwd_byte_by_byte ๐Ÿ”’ โš 
    Performs a forward byte-at-a-time loop until either ptr >= end_ptr or until confirm(*ptr) returns true. If the former occurs, then None is returned. If the latter occurs, then the pointer at which confirm returns true is returned.
  • rev_byte_by_byte ๐Ÿ”’ โš 
    Performs a reverse byte-at-a-time loop until either ptr < start_ptr or until confirm(*ptr) returns true. If the former occurs, then None is returned. If the latter occurs, then the pointer at which confirm returns true is returned.
  • search_slice_with_raw ๐Ÿ”’ โš 
    Search a slice using a function that operates on raw pointers.