Locates the first occurrence of the specified character in a memory block.
#include <string.h> void *memchr ( const void *buf, int ch, size_t length);
(IN) Points to the object to be searched.
(IN) Specifies the character to be located.
(IN) Specifies the maximum number of bytes to search.
If successful, returns a pointer to the located character. If the character does not occur in the object, returns a NULL pointer.
The memchr function locates the first occurrence of ch (converted to an unsigned char) in the first length characters of the object pointed to by buf.