7.21.5.1 The memchr function

Synopsis

1

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

Description

2

The memchr function 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.

Returns

3

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