scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

memchr.3 (619B)


      1 .TH memchr 3
      2 .SH NAME
      3 memchr - find byte in memory
      4 .SH SYNOPSIS
      5 #include <string.h>
      6 
      7 void *memchr(const void *s, int c, size_t n)
      8 .SH DESCRIPTION
      9 The
     10 .BR memchr ()
     11 function locates the first occurence of
     12 .I c
     13 (converted to an unsigned char)
     14 in the initial
     15 .I n
     16 characters
     17 (each interpreted as unsigned char)
     18 of the object pointed to by
     19 .IR s .
     20 .PP
     21 The function shall not try to locate
     22 .I c
     23 if
     24 .I n
     25 is equal to 0.
     26 .SH RETURN VALUE
     27 The
     28 .BR memchr ()
     29 function shall return a pointer to the located character
     30 or a null pointer if the character does not occur in the object.
     31 .SH STANDARDS
     32 ISO/IEC 9899:1999 Section 7.21.5.1