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