diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libc/string/strcasecmp.3 | 128 |
1 files changed, 0 insertions, 128 deletions
diff --git a/src/lib/libc/string/strcasecmp.3 b/src/lib/libc/string/strcasecmp.3 deleted file mode 100644 index bb39df895a..0000000000 --- a/src/lib/libc/string/strcasecmp.3 +++ /dev/null | |||
@@ -1,128 +0,0 @@ | |||
1 | .\" $OpenBSD: strcasecmp.3,v 1.14 2017/09/05 03:16:13 schwarze Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 1990, 1991, 1993 | ||
4 | .\" The Regents of the University of California. All rights reserved. | ||
5 | .\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org> | ||
6 | .\" | ||
7 | .\" This code is derived from software contributed to Berkeley by | ||
8 | .\" Chris Torek. | ||
9 | .\" Redistribution and use in source and binary forms, with or without | ||
10 | .\" modification, are permitted provided that the following conditions | ||
11 | .\" are met: | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in the | ||
16 | .\" documentation and/or other materials provided with the distribution. | ||
17 | .\" 3. Neither the name of the University nor the names of its contributors | ||
18 | .\" may be used to endorse or promote products derived from this software | ||
19 | .\" without specific prior written permission. | ||
20 | .\" | ||
21 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
22 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
23 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
24 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
25 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
26 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
27 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
28 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
29 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
30 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
31 | .\" SUCH DAMAGE. | ||
32 | .\" | ||
33 | .\" @(#)strcasecmp.3 8.1 (Berkeley) 6/9/93 | ||
34 | .\" | ||
35 | .Dd $Mdocdate: September 5 2017 $ | ||
36 | .Dt STRCASECMP 3 | ||
37 | .Os | ||
38 | .Sh NAME | ||
39 | .Nm strcasecmp , | ||
40 | .Nm strcasecmp_l , | ||
41 | .Nm strncasecmp , | ||
42 | .Nm strncasecmp_l | ||
43 | .Nd compare strings, ignoring case | ||
44 | .Sh SYNOPSIS | ||
45 | .In strings.h | ||
46 | .Ft int | ||
47 | .Fo strcasecmp | ||
48 | .Fa "const char *s1" | ||
49 | .Fa "const char *s2" | ||
50 | .Fc | ||
51 | .Ft int | ||
52 | .Fo strcasecmp_l | ||
53 | .Fa "const char *s1" | ||
54 | .Fa "const char *s2" | ||
55 | .Fa "locale_t locale" | ||
56 | .Fc | ||
57 | .Ft int | ||
58 | .Fo strncasecmp | ||
59 | .Fa "const char *s1" | ||
60 | .Fa "const char *s2" | ||
61 | .Fa "size_t len" | ||
62 | .Fc | ||
63 | .Ft int | ||
64 | .Fo strncasecmp_l | ||
65 | .Fa "const char *s1" | ||
66 | .Fa "const char *s2" | ||
67 | .Fa "size_t len" | ||
68 | .Fa "locale_t locale" | ||
69 | .Fc | ||
70 | .Sh DESCRIPTION | ||
71 | These functions compare the NUL-terminated strings | ||
72 | .Fa s1 | ||
73 | and | ||
74 | .Fa s2 | ||
75 | and return an integer greater than, equal to, or less than 0, | ||
76 | according to whether | ||
77 | .Fa s1 | ||
78 | is lexicographically greater than, equal to, or less than | ||
79 | .Fa s2 | ||
80 | after translation of each corresponding character to lower-case. | ||
81 | The strings themselves are not modified. | ||
82 | The comparison is done using unsigned characters, so that | ||
83 | .Sq Li \e200 | ||
84 | is greater than | ||
85 | .Ql \e0 . | ||
86 | .Pp | ||
87 | .Fn strncasecmp | ||
88 | and | ||
89 | .Fn strncasecmp_l | ||
90 | compare at most | ||
91 | .Fa len | ||
92 | characters. | ||
93 | .Pp | ||
94 | On | ||
95 | .Ox , | ||
96 | these functions always use the C locale and ignore | ||
97 | the global locale, the thread-specific locale, and the | ||
98 | .Fa locale | ||
99 | argument. | ||
100 | .Sh ENVIRONMENT | ||
101 | On other operating systems, the behaviour of | ||
102 | .Fn strcasecmp | ||
103 | and | ||
104 | .Fn strncasecmp | ||
105 | may depend on the | ||
106 | .Dv LC_CTYPE | ||
107 | .Xr locale 1 . | ||
108 | .Sh SEE ALSO | ||
109 | .Xr strcmp 3 , | ||
110 | .Xr strcoll 3 , | ||
111 | .Xr strxfrm 3 , | ||
112 | .Xr wcscasecmp 3 | ||
113 | .Sh STANDARDS | ||
114 | These functions conform to | ||
115 | .St -p1003.1-2008 . | ||
116 | .Sh HISTORY | ||
117 | The | ||
118 | .Fn strcasecmp | ||
119 | and | ||
120 | .Fn strncasecmp | ||
121 | functions have been available since | ||
122 | .Bx 4.3 Tahoe , | ||
123 | and | ||
124 | .Fn strcasecmp_l | ||
125 | and | ||
126 | .Fn strncasecmp_l | ||
127 | since | ||
128 | .Ox 6.2 . | ||