diff options
Diffstat (limited to 'src/lib/libc/string/strcasecmp.3')
-rw-r--r-- | src/lib/libc/string/strcasecmp.3 | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/src/lib/libc/string/strcasecmp.3 b/src/lib/libc/string/strcasecmp.3 index 46e9010e4f..0900c8a97a 100644 --- a/src/lib/libc/string/strcasecmp.3 +++ b/src/lib/libc/string/strcasecmp.3 | |||
@@ -1,5 +1,7 @@ | |||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 1 | .\" $OpenBSD: strcasecmp.3,v 1.11 2011/07/25 00:38:52 schwarze Exp $ |
2 | .\" All rights reserved. | 2 | .\" |
3 | .\" Copyright (c) 1990, 1991, 1993 | ||
4 | .\" The Regents of the University of California. All rights reserved. | ||
3 | .\" | 5 | .\" |
4 | .\" This code is derived from software contributed to Berkeley by | 6 | .\" This code is derived from software contributed to Berkeley by |
5 | .\" Chris Torek. | 7 | .\" Chris Torek. |
@@ -11,11 +13,7 @@ | |||
11 | .\" 2. Redistributions in binary form must reproduce the above copyright | 13 | .\" 2. Redistributions in binary form must reproduce the above copyright |
12 | .\" notice, this list of conditions and the following disclaimer in the | 14 | .\" notice, this list of conditions and the following disclaimer in the |
13 | .\" documentation and/or other materials provided with the distribution. | 15 | .\" documentation and/or other materials provided with the distribution. |
14 | .\" 3. All advertising materials mentioning features or use of this software | 16 | .\" 3. Neither the name of the University nor the names of its contributors |
15 | .\" must display the following acknowledgement: | ||
16 | .\" This product includes software developed by the University of | ||
17 | .\" California, Berkeley and its contributors. | ||
18 | .\" 4. Neither the name of the University nor the names of its contributors | ||
19 | .\" may be used to endorse or promote products derived from this software | 17 | .\" may be used to endorse or promote products derived from this software |
20 | .\" without specific prior written permission. | 18 | .\" without specific prior written permission. |
21 | .\" | 19 | .\" |
@@ -31,14 +29,14 @@ | |||
31 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
32 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
33 | .\" | 31 | .\" |
34 | .\" from: @(#)strcasecmp.3 5.4 (Berkeley) 4/19/91 | 32 | .\" @(#)strcasecmp.3 8.1 (Berkeley) 6/9/93 |
35 | .\" $Id: strcasecmp.3,v 1.1.1.1 1995/10/18 08:42:21 deraadt Exp $ | ||
36 | .\" | 33 | .\" |
37 | .Dd April 19, 1991 | 34 | .Dd $Mdocdate: July 25 2011 $ |
38 | .Dt STRCASECMP 3 | 35 | .Dt STRCASECMP 3 |
39 | .Os | 36 | .Os |
40 | .Sh NAME | 37 | .Sh NAME |
41 | .Nm strcasecmp | 38 | .Nm strcasecmp , |
39 | .Nm strncasecmp | ||
42 | .Nd compare strings, ignoring case | 40 | .Nd compare strings, ignoring case |
43 | .Sh SYNOPSIS | 41 | .Sh SYNOPSIS |
44 | .Fd #include <string.h> | 42 | .Fd #include <string.h> |
@@ -51,13 +49,12 @@ The | |||
51 | .Fn strcasecmp | 49 | .Fn strcasecmp |
52 | and | 50 | and |
53 | .Fn strncasecmp | 51 | .Fn strncasecmp |
54 | functions | 52 | functions compare the NUL-terminated strings |
55 | compare the null-terminated strings | ||
56 | .Fa s1 | 53 | .Fa s1 |
57 | and | 54 | and |
58 | .Fa s2 | 55 | .Fa s2 |
59 | and return an integer greater than, equal to, or less than 0, | 56 | and return an integer greater than, equal to, or less than 0, |
60 | according as | 57 | according to whether |
61 | .Fa s1 | 58 | .Fa s1 |
62 | is lexicographically greater than, equal to, or less than | 59 | is lexicographically greater than, equal to, or less than |
63 | .Fa s2 | 60 | .Fa s2 |
@@ -68,7 +65,6 @@ The comparison is done using unsigned characters, so that | |||
68 | is greater than | 65 | is greater than |
69 | .Ql \e0 . | 66 | .Ql \e0 . |
70 | .Pp | 67 | .Pp |
71 | The | ||
72 | .Fn strncasecmp | 68 | .Fn strncasecmp |
73 | compares at most | 69 | compares at most |
74 | .Fa len | 70 | .Fa len |
@@ -78,11 +74,19 @@ characters. | |||
78 | .Xr memcmp 3 , | 74 | .Xr memcmp 3 , |
79 | .Xr strcmp 3 , | 75 | .Xr strcmp 3 , |
80 | .Xr strcoll 3 , | 76 | .Xr strcoll 3 , |
81 | .Xr strxfrm 3 | 77 | .Xr strxfrm 3 , |
78 | .Xr wcscasecmp 3 | ||
79 | .Sh STANDARDS | ||
80 | The | ||
81 | .Fn strcasecmp | ||
82 | and | ||
83 | .Fn strncasecmp | ||
84 | functions conform to | ||
85 | .St -p1003.1-2008 . | ||
82 | .Sh HISTORY | 86 | .Sh HISTORY |
83 | The | 87 | The |
84 | .Fn strcasecmp | 88 | .Fn strcasecmp |
85 | and | 89 | and |
86 | .Fn strncasecmp | 90 | .Fn strncasecmp |
87 | functions are | 91 | functions first appeared in |
88 | .Ud . | 92 | .Bx 4.3 Tahoe . |