HP 3000 Manuals

memchr [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation


HP C/iX Library Reference Manual

memchr 

Searches memory for a specified character.

Syntax 

     #include <string.h>
     void *memchr(const void *s, int c, size_t n);

Parameters 

s             A pointer to the object to search.

c             The character value to find in the object.

n             The maximum number of characters to examine.

Return Values 

x             A pointer to the first occurrence of the character.  If the
              character c is not found, a null pointer is returned.

Description 

The memchr function returns a pointer to the first occurrence of
character c in the object pointed to by s.  Only the first n characters
of the s array are examined.  This function does not terminate when a
null character is encountered.  Each character is treated as an unsigned
character.

See Also 

memcpy(), memcmp(), memmove(), memset(), ANSI C 4.11.5.1



MPE/iX 5.0 Documentation