Name

memchr function — Searches for a byte

Synopsis

const void* memchr(const void* mem, int c, size_t n)
      void* memchr(      void* mem, int c, size_t n)

The memchr function searches the memory that mem points to, of size n bytes, for the byte whose value is c (converted to unsigned char). The return value is a pointer into the mem array to the first occurrence of c, or a null pointer if c is not present in the first n bytes of mem.