Loading...
--- Libc/Libc-1725.40.4/string/FreeBSD/strstr.3
+++ Libc/Libc-583/string/FreeBSD/strstr.3
@@ -14,7 +14,11 @@
.\" 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.
-.\" 3. Neither the name of the University nor the names of its contributors
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. 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.
.\"
@@ -31,7 +35,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)strstr.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD$
+.\" $FreeBSD: src/lib/libc/string/strstr.3,v 1.12 2001/11/20 14:11:07 ru Exp $
.\"
.Dd October 11, 2001
.Dt STRSTR 3
@@ -44,23 +48,19 @@
.Sh SYNOPSIS
.In string.h
.Ft char *
-.Fn strstr "const char *haystack" "const char *needle"
+.Fn strstr "const char *big" "const char *little"
.Ft char *
-.Fn strcasestr "const char *haystack" "const char *needle"
+.Fn strcasestr "const char *big" "const char *little"
.Ft char *
-.Fn strnstr "const char *haystack" "const char *needle" "size_t len"
-.In string.h
-.In xlocale.h
-.Ft char *
-.Fn strcasestr_l "const char *haystack" "const char *needle" "locale_t loc"
+.Fn strnstr "const char *big" "const char *little" "size_t len"
.Sh DESCRIPTION
The
.Fn strstr
function
locates the first occurrence of the null-terminated string
-.Fa needle
+.Fa little
in the null-terminated string
-.Fa haystack .
+.Fa big .
.Pp
The
.Fn strcasestr
@@ -72,9 +72,9 @@
.Fn strnstr
function
locates the first occurrence of the null-terminated string
-.Fa needle
+.Fa little
in the string
-.Fa haystack ,
+.Fa big ,
where not more than
.Fa len
characters are searched.
@@ -86,28 +86,20 @@
function is a
.Fx
specific API, it should only be used when portability is not a concern.
-.Pp
-While the
-.Fn strcasestr
-function uses the current locale, the
-.Fn strcasestr_l
-function may be passed a locale directly. See
-.Xr xlocale 3
-for more information.
.Sh RETURN VALUES
If
-.Fa needle
+.Fa little
is an empty string,
-.Fa haystack
+.Fa big
is returned;
if
-.Fa needle
+.Fa little
occurs nowhere in
-.Fa haystack ,
+.Fa big ,
.Dv NULL
is returned;
otherwise a pointer to the first character of the first occurrence of
-.Fa needle
+.Fa little
is returned.
.Sh EXAMPLES
The following sets the pointer
@@ -140,16 +132,13 @@
.Ed
.Sh SEE ALSO
.Xr memchr 3 ,
-.Xr memmem 3 ,
.Xr strchr 3 ,
.Xr strcspn 3 ,
.Xr strpbrk 3 ,
.Xr strrchr 3 ,
.Xr strsep 3 ,
.Xr strspn 3 ,
-.Xr strtok 3 ,
-.Xr wcsstr 3 ,
-.Xr xlocale 3
+.Xr strtok 3
.Sh STANDARDS
The
.Fn strstr