scc

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

strstr.3 (589B)


      1 .TH strstr 3
      2 .SH NAME
      3 strstr - locate a substring within a string
      4 .SH SYNOPSIS
      5 #include <string.h>
      6 
      7 char *strstr(const char *s1, const char *s2)
      8 .SH DESCRIPTION
      9 The
     10 .BR strstr ()
     11 function searches the string pointed to by
     12 .I s1
     13 for the first occurrence of the character sequence
     14 (not including its terminating null byte)
     15 given by the string pointed to by
     16 .IR s2 .
     17 .SH RETURN VALUE
     18 A pointer to the first match in
     19 .I s1
     20 is returned,
     21 or a null pointer if the substring is not found.
     22 .PP
     23 If
     24 .I s2
     25 points to an empty string,
     26 .I s1
     27 is returned.
     28 .SH STANDARDS
     29 ISO/IEC 9899:1999 Section 7.21.5.7