xref: /freebsd/lib/libc/string/wcscoll.3 (revision dc36d6f9bb1753f3808552f3afd30eda9a7b206a)
1fd4f1dd9STim J. Robbins.\" Copyright (c) 1990, 1991, 1993
2fd4f1dd9STim J. Robbins.\"	The Regents of the University of California.  All rights reserved.
3fd4f1dd9STim J. Robbins.\"
4fd4f1dd9STim J. Robbins.\" This code is derived from software contributed to Berkeley by
5fd4f1dd9STim J. Robbins.\" Chris Torek and the American National Standards Committee X3,
6fd4f1dd9STim J. Robbins.\" on Information Processing Systems.
7fd4f1dd9STim J. Robbins.\"
8fd4f1dd9STim J. Robbins.\" Redistribution and use in source and binary forms, with or without
9fd4f1dd9STim J. Robbins.\" modification, are permitted provided that the following conditions
10fd4f1dd9STim J. Robbins.\" are met:
11fd4f1dd9STim J. Robbins.\" 1. Redistributions of source code must retain the above copyright
12fd4f1dd9STim J. Robbins.\"    notice, this list of conditions and the following disclaimer.
13fd4f1dd9STim J. Robbins.\" 2. Redistributions in binary form must reproduce the above copyright
14fd4f1dd9STim J. Robbins.\"    notice, this list of conditions and the following disclaimer in the
15fd4f1dd9STim J. Robbins.\"    documentation and/or other materials provided with the distribution.
16*3fb3b97cSEd Maste.\" 3. Neither the name of the University nor the names of its contributors
17fd4f1dd9STim J. Robbins.\"    may be used to endorse or promote products derived from this software
18fd4f1dd9STim J. Robbins.\"    without specific prior written permission.
19fd4f1dd9STim J. Robbins.\"
20fd4f1dd9STim J. Robbins.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21fd4f1dd9STim J. Robbins.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22fd4f1dd9STim J. Robbins.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23fd4f1dd9STim J. Robbins.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24fd4f1dd9STim J. Robbins.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25fd4f1dd9STim J. Robbins.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26fd4f1dd9STim J. Robbins.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27fd4f1dd9STim J. Robbins.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28fd4f1dd9STim J. Robbins.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29fd4f1dd9STim J. Robbins.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30fd4f1dd9STim J. Robbins.\" SUCH DAMAGE.
31fd4f1dd9STim J. Robbins.\" FreeBSD: src/lib/libc/string/strcoll.3,v 1.11 2001/10/01 16:09:00 ru Exp
32fd4f1dd9STim J. Robbins.\"
33fd4f1dd9STim J. Robbins.Dd October 4, 2002
34fd4f1dd9STim J. Robbins.Dt WCSCOLL 3
35fd4f1dd9STim J. Robbins.Os
36fd4f1dd9STim J. Robbins.Sh NAME
37fd4f1dd9STim J. Robbins.Nm wcscoll
38fd4f1dd9STim J. Robbins.Nd compare wide strings according to current collation
39fd4f1dd9STim J. Robbins.Sh LIBRARY
40fd4f1dd9STim J. Robbins.Lb libc
41fd4f1dd9STim J. Robbins.Sh SYNOPSIS
42fd4f1dd9STim J. Robbins.In wchar.h
43fd4f1dd9STim J. Robbins.Ft int
44fd4f1dd9STim J. Robbins.Fn wcscoll "const wchar_t *s1" "const wchar_t *s2"
45fd4f1dd9STim J. Robbins.Sh DESCRIPTION
46fd4f1dd9STim J. RobbinsThe
47fd4f1dd9STim J. Robbins.Fn wcscoll
48fd4f1dd9STim J. Robbinsfunction compares the null-terminated strings
49fd4f1dd9STim J. Robbins.Fa s1
50fd4f1dd9STim J. Robbinsand
51fd4f1dd9STim J. Robbins.Fa s2
52fd4f1dd9STim J. Robbinsaccording to the current locale collation order.
53fd4f1dd9STim J. RobbinsIn the
54fd4f1dd9STim J. Robbins.Dq Li C
55fd4f1dd9STim J. Robbinslocale,
56fd4f1dd9STim J. Robbins.Fn wcscoll
57fd4f1dd9STim J. Robbinsis equivalent to
58fd4f1dd9STim J. Robbins.Fn wcscmp .
59fd4f1dd9STim J. Robbins.Sh RETURN VALUES
60fd4f1dd9STim J. RobbinsThe
61fd4f1dd9STim J. Robbins.Fn wcscoll
62fd4f1dd9STim J. Robbinsfunction
63fd4f1dd9STim J. Robbinsreturns an integer greater than, equal to, or less than 0,
64fd4f1dd9STim J. Robbinsif
65fd4f1dd9STim J. Robbins.Fa s1
66fd4f1dd9STim J. Robbinsis greater than, equal to, or less than
67fd4f1dd9STim J. Robbins.Fa s2 .
68fd4f1dd9STim J. Robbins.Pp
69fd4f1dd9STim J. RobbinsNo return value is reserved to indicate errors;
70fd4f1dd9STim J. Robbinscallers should set
71fd4f1dd9STim J. Robbins.Va errno
72fd4f1dd9STim J. Robbinsto 0 before calling
73fd4f1dd9STim J. Robbins.Fn wcscoll .
74fd4f1dd9STim J. RobbinsIf it is non-zero upon return from
75fd4f1dd9STim J. Robbins.Fn wcscoll ,
76fd4f1dd9STim J. Robbinsan error has occurred.
77fd4f1dd9STim J. Robbins.Sh ERRORS
78fd4f1dd9STim J. RobbinsThe
79fd4f1dd9STim J. Robbins.Fn wcscoll
80fd4f1dd9STim J. Robbinsfunction will fail if:
81fd4f1dd9STim J. Robbins.Bl -tag -width Er
82fd4f1dd9STim J. Robbins.It Bq Er EILSEQ
83fd4f1dd9STim J. RobbinsAn invalid wide character code was specified.
84fd4f1dd9STim J. Robbins.It Bq Er ENOMEM
85fd4f1dd9STim J. RobbinsCannot allocate enough memory for temporary buffers.
86fd4f1dd9STim J. Robbins.El
87fd4f1dd9STim J. Robbins.Sh SEE ALSO
88fd4f1dd9STim J. Robbins.Xr setlocale 3 ,
89fd4f1dd9STim J. Robbins.Xr strcoll 3 ,
90fd4f1dd9STim J. Robbins.Xr wcscmp 3 ,
91fd4f1dd9STim J. Robbins.Xr wcsxfrm 3
92fd4f1dd9STim J. Robbins.Sh STANDARDS
93fd4f1dd9STim J. RobbinsThe
94fd4f1dd9STim J. Robbins.Fn wcscoll
95fd4f1dd9STim J. Robbinsfunction
96fd4f1dd9STim J. Robbinsconforms to
97fd4f1dd9STim J. Robbins.St -isoC-99 .
98fd4f1dd9STim J. Robbins.Sh BUGS
99fd4f1dd9STim J. RobbinsThe current implementation of
100fd4f1dd9STim J. Robbins.Fn wcscoll
101fd4f1dd9STim J. Robbinsonly works in single-byte
102fd4f1dd9STim J. Robbins.Dv LC_CTYPE
103fd4f1dd9STim J. Robbinslocales, and falls back to using
104fd4f1dd9STim J. Robbins.Fn wcscmp
105fd4f1dd9STim J. Robbinsin locales with extended character sets.
106