Locates the first occurrence of the specified byte within the initial size bytes of a given object.
#include <string.h> void *memchr (const void *s1, int c, size_t size);Function Variants This function also has variants named _memchr32 and _memchr64 for use with 32-bit and 64-bit pointer sizes, respectively. See Section 1.8 for more information on using pointer-size-specific functions.
If size is zero, memchr returns NULL.
pointer | A pointer to the first occurrence of the byte. |
NULL | Indicates that the specified byte does not occur in the object. |