Guardian C Library Calls Reference Manual

Reference to Library Calls
Guardian TNS C Library Calls Reference Manual128833 3-117
memchr
memchr
The memchr function searches for the first occurrence of a byte value within a block of
memory.
block
points to the block to search.
value
is the value to search for; it is converted to an unsigned char before the search.
block_size
is the size in bytes of the block to search.
Return Value
points to the first occurrence of value if it is found; otherwise, memchr returns the
pointer value NULL.
#include <stringh>
void *memchr(const void *block, int value, size_t
block_size);