The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group

 NAME

memchr - find byte in memory

 SYNOPSIS



#include <string.h>

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

 DESCRIPTION

The memchr() function locates the first occurrence of c (converted to an unsigned char) in the initial n bytes (each interpreted as unsigned char) of the object pointed to by s.

 RETURN VALUE

The memchr() function returns a pointer to the located byte, or a null pointer if the byte does not occur in the object.

 ERRORS

No errors are defined.

 EXAMPLES

None.

 APPLICATION USAGE

None.

 FUTURE DIRECTIONS

None.

 SEE ALSO

<string.h>.

DERIVATION

Derived from Issue 1 of the SVID.

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]