1STRSTR(3)                  Library Functions Manual                  STRSTR(3)
2
3
4

NAME

6       strstr - locate a substring in a string
7

SYNOPSIS

9       #include <string.h>
10
11       char *
12       strstr(big, little)
13       char *big, *little;
14

DESCRIPTION

16       The  strstr()  function locates the first occurrence of the null-termi‐
17       nated string little in the null-terminated string big.   If  little  is
18       the  empty  string,  strstr()  returns big; if little occurs nowhere in
19       big, strstr() returns NULL; otherwise strstr() returns a pointer to the
20       first character of the first occurrence of little.
21

SEE ALSO

23       index(3), memchr(3), rindex(3), strchr(3), strcspn(3), strpbrk(3), str‐
24       rchr(3), strsep(3), strspn(3), strtok(3)
25

STANDARDS

27       The strstr() function conforms to ANSI C X3/159-1989 (``ANSI C'').
28
29
30
314.4 Berkeley Distribution      January 15, 1996                      STRSTR(3)
Impressum