Everything

memchr


Searches a specified storage area for the first occurrence of a specified character.

[Format]

#include <string.h>

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

[Parameters]

s Pointer to the storage area to be searched

c Character to search for

n Number of characters to search

[Return values]

If the character is found: Pointer to the found character

If the character is not found: NULL

[Remarks]

The memchr function searches the storage area specified by s from the beginning up to n characters, looking for the first occurrence of the character specified as c. If the c character is found, the function returns the pointer to the found character.