MEMCHR(3)

NAME
memchr - find character in memory

SYNOPSIS

#include <string.h>

void *memchr(const void *src, int c, size_t length);

DESCRIPTION

This function searches memory starting at *src for the character c. The search only ends with the first occurrence of c, or after length characters; in particular, NUL does not terminate the search.

RETURNS

If the character c is found within length characters of *src, a pointer to the character is returned. If c is not found, then NULL is returned.

PORTABILITY

memchr is ANSI C.

memchr requires no supporting OS subroutines.