added strcasecmp() and strcasencmp()
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 3 Jul 1987 00:28:15 +0000 (16:28 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 3 Jul 1987 00:28:15 +0000 (16:28 -0800)
SCCS-vsn: lib/libc/string/string.3 6.3

usr/src/lib/libc/string/string.3

index 378ac23..894961b 100644 (file)
@@ -2,12 +2,13 @@
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
-.\"    @(#)string.3    6.2 (Berkeley) %G%
+.\"    @(#)string.3    6.3 (Berkeley) %G%
 .\"
 .TH STRING 3  ""
 .UC 4
 .SH NAME
 .\"
 .TH STRING 3  ""
 .UC 4
 .SH NAME
-strcat, strncat, strcmp, strncmp, strcpy, strncpy, strlen, index, rindex \- string operations
+strcat, strncat, strcmp, strncmp, strcasecmp, strcasencmp, strcpy,
+strncpy, strlen, index, rindex \- string operations
 .SH SYNOPSIS
 .nf
 .B #include <strings.h>
 .SH SYNOPSIS
 .nf
 .B #include <strings.h>
@@ -24,6 +25,12 @@ strcat, strncat, strcmp, strncmp, strcpy, strncpy, strlen, index, rindex \- stri
 .B strncmp(s1, s2, n)
 .B char *s1, *s2;
 .PP
 .B strncmp(s1, s2, n)
 .B char *s1, *s2;
 .PP
+.B strcasecmp(s1, s2)
+.B char *s1, *s2;
+.PP
+.B strcasencmp(s1, s2, n)
+.B char *s1, *s2;
+.PP
 .B char *strcpy(s1, s2)
 .B char *s1, *s2;
 .PP
 .B char *strcpy(s1, s2)
 .B char *s1, *s2;
 .PP
@@ -62,7 +69,9 @@ is lexicographically greater than, equal to, or less than
 .I Strncmp
 makes the same comparison but looks at at most
 .I n
 .I Strncmp
 makes the same comparison but looks at at most
 .I n
-characters.
+characters.  \fIStrcasecmp\fP and \fIstrcasencmp\fP are identical
+in function, but are case insensitive.  The returned lexicographic
+difference reflects a conversion to lower-case.
 .PP
 .I Strcpy
 copies string
 .PP
 .I Strcpy
 copies string