diff options
author | deraadt <> | 1995-10-18 08:42:23 +0000 |
---|---|---|
committer | deraadt <> | 1995-10-18 08:42:23 +0000 |
commit | 0527d29da443886d92e9a418180c5b25a5f8d270 (patch) | |
tree | 86b3a64928451a669cefa27900e5884036b4e349 /src/lib/libc/string/strcasecmp.3 | |
download | openbsd-0527d29da443886d92e9a418180c5b25a5f8d270.tar.gz openbsd-0527d29da443886d92e9a418180c5b25a5f8d270.tar.bz2 openbsd-0527d29da443886d92e9a418180c5b25a5f8d270.zip |
initial import of NetBSD tree
Diffstat (limited to 'src/lib/libc/string/strcasecmp.3')
-rw-r--r-- | src/lib/libc/string/strcasecmp.3 | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/src/lib/libc/string/strcasecmp.3 b/src/lib/libc/string/strcasecmp.3 new file mode 100644 index 0000000000..46e9010e4f --- /dev/null +++ b/src/lib/libc/string/strcasecmp.3 | |||
@@ -0,0 +1,88 @@ | |||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | ||
2 | .\" All rights reserved. | ||
3 | .\" | ||
4 | .\" This code is derived from software contributed to Berkeley by | ||
5 | .\" Chris Torek. | ||
6 | .\" Redistribution and use in source and binary forms, with or without | ||
7 | .\" modification, are permitted provided that the following conditions | ||
8 | .\" are met: | ||
9 | .\" 1. Redistributions of source code must retain the above copyright | ||
10 | .\" notice, this list of conditions and the following disclaimer. | ||
11 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer in the | ||
13 | .\" documentation and/or other materials provided with the distribution. | ||
14 | .\" 3. All advertising materials mentioning features or use of this software | ||
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 | ||
20 | .\" without specific prior written permission. | ||
21 | .\" | ||
22 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
23 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
24 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
25 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
26 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
27 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
28 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
29 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
30 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
31 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
32 | .\" SUCH DAMAGE. | ||
33 | .\" | ||
34 | .\" from: @(#)strcasecmp.3 5.4 (Berkeley) 4/19/91 | ||
35 | .\" $Id: strcasecmp.3,v 1.1.1.1 1995/10/18 08:42:21 deraadt Exp $ | ||
36 | .\" | ||
37 | .Dd April 19, 1991 | ||
38 | .Dt STRCASECMP 3 | ||
39 | .Os | ||
40 | .Sh NAME | ||
41 | .Nm strcasecmp | ||
42 | .Nd compare strings, ignoring case | ||
43 | .Sh SYNOPSIS | ||
44 | .Fd #include <string.h> | ||
45 | .Ft int | ||
46 | .Fn strcasecmp "const char *s1" "const char *s2" | ||
47 | .Ft int | ||
48 | .Fn strncasecmp "const char *s1" "const char *s2" "size_t len" | ||
49 | .Sh DESCRIPTION | ||
50 | The | ||
51 | .Fn strcasecmp | ||
52 | and | ||
53 | .Fn strncasecmp | ||
54 | functions | ||
55 | compare the null-terminated strings | ||
56 | .Fa s1 | ||
57 | and | ||
58 | .Fa s2 | ||
59 | and return an integer greater than, equal to, or less than 0, | ||
60 | according as | ||
61 | .Fa s1 | ||
62 | is lexicographically greater than, equal to, or less than | ||
63 | .Fa s2 | ||
64 | after translation of each corresponding character to lower-case. | ||
65 | The strings themselves are not modified. | ||
66 | The comparison is done using unsigned characters, so that | ||
67 | .Sq Li \e200 | ||
68 | is greater than | ||
69 | .Ql \e0 . | ||
70 | .Pp | ||
71 | The | ||
72 | .Fn strncasecmp | ||
73 | compares at most | ||
74 | .Fa len | ||
75 | characters. | ||
76 | .Sh SEE ALSO | ||
77 | .Xr bcmp 3 , | ||
78 | .Xr memcmp 3 , | ||
79 | .Xr strcmp 3 , | ||
80 | .Xr strcoll 3 , | ||
81 | .Xr strxfrm 3 | ||
82 | .Sh HISTORY | ||
83 | The | ||
84 | .Fn strcasecmp | ||
85 | and | ||
86 | .Fn strncasecmp | ||
87 | functions are | ||
88 | .Ud . | ||