]> git.saurik.com Git - apple/libc.git/blobdiff - string/FreeBSD/strstr.3
Libc-1081.1.3.tar.gz
[apple/libc.git] / string / FreeBSD / strstr.3
index 70fbda4db58b3baa6f3a3af1ad388698cc0fa184..f02ab438c3203b3c9416a2d7f6ec0136c5101c19 100644 (file)
@@ -14,7 +14,7 @@
 .\" 2. Redistributions in binary form must reproduce the above copyright
 .\"    notice, this list of conditions and the following disclaimer in the
 .\"    documentation and/or other materials provided with the distribution.
-.\" 4. Neither the name of the University nor the names of its contributors
+.\" 3. Neither the name of the University nor the names of its contributors
 .\"    may be used to endorse or promote products derived from this software
 .\"    without specific prior written permission.
 .\"
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)strstr.3   8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/string/strstr.3,v 1.15 2009/04/07 13:42:53 trasz Exp $
+.\" $FreeBSD$
 .\"
 .Dd October 11, 2001
 .Dt STRSTR 3
 .Os
 .Sh NAME
-.Nm strcasestr ,
-.Nm strcasestr_l ,
-.Nm strnstr ,
-.Nm strstr
+.Nm strstr , strcasestr , strnstr
 .Nd locate a substring in a string
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
 .In string.h
 .Ft char *
-.Fo strcasestr
-.Fa "const char *s1"
-.Fa "const char *s2"
-.Fc
+.Fn strstr "const char *big" "const char *little"
 .Ft char *
-.Fo strnstr
-.Fa "const char *s1"
-.Fa "const char *s2"
-.Fa "size_t n"
-.Fc
+.Fn strcasestr "const char *big" "const char *little"
 .Ft char *
-.Fo strstr
-.Fa "const char *s1"
-.Fa "const char *s2"
-.Fc
+.Fn strnstr "const char *big" "const char *little" "size_t len"
 .In string.h
 .In xlocale.h
 .Ft char *
-.Fo strcasestr_l
-.Fa "const char *s1"
-.Fa "const char *s2"
-.Fa "locale_t loc"
-.Fc
+.Fn strcasestr_l "const char *big" "const char *little" "locale_t loc"
 .Sh DESCRIPTION
 The
 .Fn strstr
 function
 locates the first occurrence of the null-terminated string
-.Fa s2
+.Fa little
 in the null-terminated string
-.Fa s1 .
+.Fa big .
 .Pp
 The
 .Fn strcasestr
@@ -89,11 +72,11 @@ The
 .Fn strnstr
 function
 locates the first occurrence of the null-terminated string
-.Fa s2
+.Fa little
 in the string
-.Fa s1 ,
+.Fa big ,
 where not more than
-.Fa n
+.Fa len
 characters are searched.
 Characters that appear after a
 .Ql \e0
@@ -113,18 +96,18 @@ function may be passed a locale directly. See
 for more information.
 .Sh RETURN VALUES
 If
-.Fa s2
+.Fa little
 is an empty string,
-.Fa s1
+.Fa big
 is returned;
 if
-.Fa s2
+.Fa little
 occurs nowhere in
-.Fa s1 ,
+.Fa big ,
 .Dv NULL
 is returned;
 otherwise a pointer to the first character of the first occurrence of
-.Fa s2
+.Fa little
 is returned.
 .Sh EXAMPLES
 The following sets the pointer
@@ -157,6 +140,7 @@ ptr = strnstr(largestring, smallstring, 4);
 .Ed
 .Sh SEE ALSO
 .Xr memchr 3 ,
+.Xr memmem 3 ,
 .Xr strchr 3 ,
 .Xr strcspn 3 ,
 .Xr strpbrk 3 ,