##### Synopsis

    #include <string.h>
    void *memchr(const void *s, int c, size_t n);

##### Description

memchr locates the first occurrence of c (converted to an unsigned char) in the initial n characters (each interpreted as unsigned char) of the object pointed to by s. Unlike strchr, memchr does not terminate a search when a null character is found in the object pointed to by s.

memchr returns a pointer to the located character, or a null pointer if c does not occur in the object.

##### Portability

memchr conforms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).

##### See also

strchr