DOKK / manpages / debian 11 / manpages-pt-dev / memchr.3.pt
MEMCHR(3) Linux Programmer's Manual MEMCHR(3)

memchr - scan memory for a character

#include <string.h>

void *memchr(const void *s, int c, size_t n);

The memchr() function scans the first n bytes of the memory area pointed to by s for the character c. The first byte to match c (interpreted as an unsigned character) stops the operation.

The memchr() function returns a pointer to the matching byte or NULL if the character does not occur in the given memory area.

SVID 3, BSD 4.3, ISO 9899

index(3), rindex(3), strchr(3), strpbrk(3), strrchr(3), strsep(3), strspn(3), strstr(3)

April 12, 1993 GNU