]> git.saurik.com Git - apple/libc.git/blobdiff - string/FreeBSD/strcasecmp.3
Libc-1158.30.7.tar.gz
[apple/libc.git] / string / FreeBSD / strcasecmp.3
index 5f7a81c61ad9ab01a4623a5de0ac2af9de5de904..0d686a6b17ac3287af4a239532dd63a5bc99fab5 100644 (file)
 .\" 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. 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.
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)strcasecmp.3       8.1 (Berkeley) 6/9/93
-.\" $FreeBSD: src/lib/libc/string/strcasecmp.3,v 1.10 2002/08/30 15:40:01 robert Exp $
+.\" $FreeBSD: src/lib/libc/string/strcasecmp.3,v 1.13 2009/04/07 13:42:53 trasz Exp $
 .\"
 .Dd June 9, 1993
 .Dt STRCASECMP 3
 .Os
 .Sh NAME
 .Nm strcasecmp ,
-.Nm strncasecmp
+.Nm strcasecmp_l ,
+.Nm strncasecmp ,
+.Nm strncasecmp_l
 .Nd compare strings, ignoring case
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
 .In strings.h
 .Ft int
-.Fn strcasecmp "const char *s1" "const char *s2"
+.Fo strcasecmp
+.Fa "const char *s1"
+.Fa "const char *s2"
+.Fc
 .Ft int
-.Fn strncasecmp "const char *s1" "const char *s2" "size_t len"
+.Fo strncasecmp
+.Fa "const char *s1"
+.Fa "const char *s2"
+.Fa "size_t n"
+.Fc
+.In strings.h
+.In xlocale.h
+.Ft int
+.Fo strcasecmp_l
+.Fa "const char *s1"
+.Fa "const char *s2"
+.Fa "locale_t loc"
+.Fc
+.Ft int
+.Fo strncasecmp_l
+.Fa "const char *s1"
+.Fa "const char *s2"
+.Fa "size_t n"
+.Fa "locale_t loc"
+.Fc
 .Sh DESCRIPTION
 The
 .Fn strcasecmp
@@ -63,8 +83,20 @@ and
 The
 .Fn strncasecmp
 compares at most
-.Fa len
+.Fa n
 characters.
+.Pp
+Although the
+.Fn strcasecmp
+and
+.Fn strncasecmp
+functions use the current locale, the
+.Fn strcasecmp_l
+and
+.Fn strncasecmp_l
+functions may be passed locales directly. See
+.Xr xlocale 3
+for more information.
 .Sh RETURN VALUES
 The
 .Fn strcasecmp
@@ -87,7 +119,8 @@ is greater than
 .Xr strcmp 3 ,
 .Xr strcoll 3 ,
 .Xr strxfrm 3 ,
-.Xr tolower 3
+.Xr tolower 3 ,
+.Xr xlocale 3
 .Sh HISTORY
 The
 .Fn strcasecmp
@@ -96,9 +129,9 @@ and
 functions first appeared in
 .Bx 4.4 .
 Their prototypes existed previously in
-.Aq Pa string.h
+.In string.h
 before they were moved to
-.Aq Pa strings.h
+.In strings.h
 for
 .St -p1003.1-2001
 compliance.