1f07f0fb6SGarrett D'Amore.\"
2f07f0fb6SGarrett D'Amore.\" This file and its contents are supplied under the terms of the
3f07f0fb6SGarrett D'Amore.\" Common Development and Distribution License ("CDDL"), version 1.0.
4f07f0fb6SGarrett D'Amore.\" You may only use this file in accordance with the terms of version
5f07f0fb6SGarrett D'Amore.\" 1.0 of the CDDL.
6f07f0fb6SGarrett D'Amore.\"
7f07f0fb6SGarrett D'Amore.\" A full copy of the text of the CDDL should have accompanied this
8f07f0fb6SGarrett D'Amore.\" source.  A copy of the CDDL is also available via the Internet at
9f07f0fb6SGarrett D'Amore.\" http://www.illumos.org/license/CDDL.
10f07f0fb6SGarrett D'Amore.\"
11f07f0fb6SGarrett D'Amore.\"
12f07f0fb6SGarrett D'Amore.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
13f07f0fb6SGarrett D'Amore.\"
14f07f0fb6SGarrett D'Amore.Dd "Nov 4, 2014"
15f07f0fb6SGarrett D'Amore.Dt WCSCASECMP 3C
16f07f0fb6SGarrett D'Amore.Os
17f07f0fb6SGarrett D'Amore.Sh NAME
18f07f0fb6SGarrett D'Amore.Nm wcscasecmp ,
19f07f0fb6SGarrett D'Amore.Nm wcscasecmp_l ,
20f07f0fb6SGarrett D'Amore.Nm wcsncasecmp ,
21f07f0fb6SGarrett D'Amore.Nm wcsncasecmp_l
22f07f0fb6SGarrett D'Amore.Nd case-insensitive wide-character string comparison
23f07f0fb6SGarrett D'Amore.Sh SYNOPSIS
24f07f0fb6SGarrett D'Amore.In wchar.h
25f07f0fb6SGarrett D'Amore.
26f07f0fb6SGarrett D'Amore.Ft int
27f07f0fb6SGarrett D'Amore.Fo wcscasecmp
28f07f0fb6SGarrett D'Amore.Fa "const wchar_t *ws1"
29f07f0fb6SGarrett D'Amore.Fa "const wchar_t *ws2"
30f07f0fb6SGarrett D'Amore.Fc
31f07f0fb6SGarrett D'Amore.
32f07f0fb6SGarrett D'Amore.Ft int
33f07f0fb6SGarrett D'Amore.Fo wcscasecmp_l
34f07f0fb6SGarrett D'Amore.Fa "const wchar_t *ws1"
35f07f0fb6SGarrett D'Amore.Fa "const wchar_t *ws2"
36f07f0fb6SGarrett D'Amore.Fa "locale_t loc"
37f07f0fb6SGarrett D'Amore.Fc
38f07f0fb6SGarrett D'Amore.
39f07f0fb6SGarrett D'Amore.Ft int
40f07f0fb6SGarrett D'Amore.Fo wcsncasecmp
41f07f0fb6SGarrett D'Amore.Fa "const wchar_t *ws1"
42f07f0fb6SGarrett D'Amore.Fa "const wchar_t *ws2"
43f07f0fb6SGarrett D'Amore.Fa "size_t n"
44f07f0fb6SGarrett D'Amore.Fc
45f07f0fb6SGarrett D'Amore.
46f07f0fb6SGarrett D'Amore.Ft int
47f07f0fb6SGarrett D'Amore.Fo wcsncasecmp_l
48f07f0fb6SGarrett D'Amore.Fa "const wchar_t *ws1"
49f07f0fb6SGarrett D'Amore.Fa "const wchar_t *ws2"
50f07f0fb6SGarrett D'Amore.Fa "size_t n"
51f07f0fb6SGarrett D'Amore.Fa "locale_t loc"
52f07f0fb6SGarrett D'Amore.Fc
53f07f0fb6SGarrett D'Amore.Sh DESCRIPTION
54f07f0fb6SGarrett D'AmoreThese functions perform case-insensitive comparison of wide-character
55f07f0fb6SGarrett D'Amorestrings
56f07f0fb6SGarrett D'Amore.Fa ws1
57f07f0fb6SGarrett D'Amoreand
58f07f0fb6SGarrett D'Amore.Fa ws2 .
59f07f0fb6SGarrett D'AmorePairs of wide-characters from each of
60f07f0fb6SGarrett D'Amore.Fa ws1
61f07f0fb6SGarrett D'Amoreand
62f07f0fb6SGarrett D'Amore.Fa ws2
63f07f0fb6SGarrett D'Amoreare compared consecutively, ignoring differences in case (if the
64f07f0fb6SGarrett D'Amore.\"POSIX\." locale upper case characters are treated as lower case).  If
65f07f0fb6SGarrett D'Amorethe two values are different, the comparision stops and either
66f07f0fb6SGarrett D'Amorea negative value is returned if the character from
67f07f0fb6SGarrett D'Amore.Fa ws1
68f07f0fb6SGarrett D'Amoreis less than that from
69f07f0fb6SGarrett D'Amore.Fa ws2 ,
70f07f0fb6SGarrett D'Amoreor a positive is returned if the character from
71f07f0fb6SGarrett D'Amore.Fa ws1
72f07f0fb6SGarrett D'Amoreis greater than that from
73f07f0fb6SGarrett D'Amore.Fa ws2 .
74f07f0fb6SGarrett D'AmoreThe comparison also stops if both characters are null wide-characters,
75f07f0fb6SGarrett D'Amoreor, in the case of
76f07f0fb6SGarrett D'Amore.Fn wcsncasecmp
77f07f0fb6SGarrett D'Amoreand
78f07f0fb6SGarrett D'Amore.Fn wcsncasecmp_l ,
79f07f0fb6SGarrett D'Amoreafter
80f07f0fb6SGarrett D'Amore.Fa n
81f07f0fb6SGarrett D'Amorecomparisons have been made without finding a difference.  In either of
82f07f0fb6SGarrett D'Amorethese two cases, 0 is returned.
83f07f0fb6SGarrett D'Amore.Lp
84f07f0fb6SGarrett D'AmoreThe
85f07f0fb6SGarrett D'Amore.Fn wcscasecmp
86f07f0fb6SGarrett D'Amoreand
87f07f0fb6SGarrett D'Amore.Fn wcsncasecmp
88f07f0fb6SGarrett D'Amorefunctions use the
89f07f0fb6SGarrett D'Amore.Dv LC_CTYPE
90f07f0fb6SGarrett D'Amorecategory of the current locale to determine case.  The
91f07f0fb6SGarrett D'Amore.Fn wcscasecmp_l
92f07f0fb6SGarrett D'Amoreand
93f07f0fb6SGarrett D'Amore.Fn wcsncasecmp_l
94f07f0fb6SGarrett D'Amorefunctions use the
95f07f0fb6SGarrett D'Amore.Dv LC_CTYPE
96f07f0fb6SGarrett D'Amorecategory of the locale pointed to by
97f07f0fb6SGarrett D'Amore.Fa loc
98f07f0fb6SGarrett D'Amoreto determine case.
99f07f0fb6SGarrett D'Amore.Lp
100f07f0fb6SGarrett D'AmorePassing
101f07f0fb6SGarrett D'Amore.Dv LC_GLOBAL_LOCALE
102f07f0fb6SGarrett D'Amorefor
103f07f0fb6SGarrett D'Amore.Fa loc
104f07f0fb6SGarrett D'Amoreresults in undefined behavior.
105f07f0fb6SGarrett D'Amore.Lp
106f07f0fb6SGarrett D'AmoreThe
107f07f0fb6SGarrett D'Amore.Fn wcscasecmp ,
108f07f0fb6SGarrett D'Amore.Fn wcsncasecmp ,
109f07f0fb6SGarrett D'Amore.Fn wcscasecmp_l ,
110f07f0fb6SGarrett D'Amoreand
111f07f0fb6SGarrett D'Amore.Fn wcsncasecmp_l
112f07f0fb6SGarrett D'Amorefunctions are the wide-character equivalents of the
113f07f0fb6SGarrett D'Amore.Fn strcasecmp ,
114f07f0fb6SGarrett D'Amore.Fn strncasecmp ,
115f07f0fb6SGarrett D'Amore.Fn strcasemp_l ,
116f07f0fb6SGarrett D'Amoreand
117f07f0fb6SGarrett D'Amore.Fn strncasecmp_l
118f07f0fb6SGarrett D'Amorefunctions, respectively.
119f07f0fb6SGarrett D'Amore.Sh RETURN VALUES
120f07f0fb6SGarrett D'AmoreThese functions return a negative value if, ignoring case,
121f07f0fb6SGarrett D'Amore.Fa ws1
122f07f0fb6SGarrett D'Amoreis less than
123f07f0fb6SGarrett D'Amore.Fa ws1 ,
124f07f0fb6SGarrett D'Amoreor a positive value  if
125f07f0fb6SGarrett D'Amore.Fa ws1
126f07f0fb6SGarrett D'Amoreis greater than
127f07f0fb6SGarrett D'Amore.Fa ws2 ,
128f07f0fb6SGarrett D'Amoreor 0 if the both
129f07f0fb6SGarrett D'Amore.Fa ws1
130f07f0fb6SGarrett D'Amoreand
131f07f0fb6SGarrett D'Amore.Fa ws2
132f07f0fb6SGarrett D'Amoreare the same.
133f07f0fb6SGarrett D'Amore.Sh ERRORS
134f07f0fb6SGarrett D'AmoreNone.
135f07f0fb6SGarrett D'Amore.Sh INTERFACE STABILITY
136f07f0fb6SGarrett D'Amore.Sy Standard .
137f07f0fb6SGarrett D'Amore.Sh MT-LEVEL
138f07f0fb6SGarrett D'Amore.Sy MT-Safe .
139f07f0fb6SGarrett D'Amore.Sh SEE ALSO
140f07f0fb6SGarrett D'Amore.Xr newlocale 3C ,
141f07f0fb6SGarrett D'Amore.Xr setlocale 3C ,
142f07f0fb6SGarrett D'Amore.Xr strcasecmp 3C ,
143f07f0fb6SGarrett D'Amore.Xr strcasecmp_l 3C ,
144f07f0fb6SGarrett D'Amore.Xr strncasecmp 3C ,
145f07f0fb6SGarrett D'Amore.Xr strncasecmp_l 3C ,
146f07f0fb6SGarrett D'Amore.Xr uselocale 3C ,
147f07f0fb6SGarrett D'Amore.Xr wchar.h 3HEAD ,
148f07f0fb6SGarrett D'Amore.Xr locale 5 ,
149f07f0fb6SGarrett D'Amore.Xr standards 5
150f07f0fb6SGarrett D'Amore.Sh STANDARDS
151f07f0fb6SGarrett D'AmoreThe
152f07f0fb6SGarrett D'Amore.Fn wcscasecmp ,
153f07f0fb6SGarrett D'Amore.Fn wcsncasecmp ,
154f07f0fb6SGarrett D'Amore.Fn wcscasecmp_l ,
155f07f0fb6SGarrett D'Amoreand
156f07f0fb6SGarrett D'Amore.Fn wcsncasecmp_l
157f07f0fb6SGarrett D'Amorefunctions were introduced in
158f07f0fb6SGarrett D'Amore.St -p1003.1-2008 .
159