xref: /freebsd/lib/libc/string/wcscoll.3 (revision 3fb3b97c4d38990da5f45b37e48a5110b3e9bc58)
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.\"
32fd4f1dd9STim J. Robbins.\"     @(#)strcoll.3	8.1 (Berkeley) 6/4/93
33fd4f1dd9STim J. Robbins.\" FreeBSD: src/lib/libc/string/strcoll.3,v 1.11 2001/10/01 16:09:00 ru Exp
34fd4f1dd9STim J. Robbins.\" $FreeBSD$
35fd4f1dd9STim J. Robbins.\"
36fd4f1dd9STim J. Robbins.Dd October 4, 2002
37fd4f1dd9STim J. Robbins.Dt WCSCOLL 3
38fd4f1dd9STim J. Robbins.Os
39fd4f1dd9STim J. Robbins.Sh NAME
40fd4f1dd9STim J. Robbins.Nm wcscoll
41fd4f1dd9STim J. Robbins.Nd compare wide strings according to current collation
42fd4f1dd9STim J. Robbins.Sh LIBRARY
43fd4f1dd9STim J. Robbins.Lb libc
44fd4f1dd9STim J. Robbins.Sh SYNOPSIS
45fd4f1dd9STim J. Robbins.In wchar.h
46fd4f1dd9STim J. Robbins.Ft int
47fd4f1dd9STim J. Robbins.Fn wcscoll "const wchar_t *s1" "const wchar_t *s2"
48fd4f1dd9STim J. Robbins.Sh DESCRIPTION
49fd4f1dd9STim J. RobbinsThe
50fd4f1dd9STim J. Robbins.Fn wcscoll
51fd4f1dd9STim J. Robbinsfunction compares the null-terminated strings
52fd4f1dd9STim J. Robbins.Fa s1
53fd4f1dd9STim J. Robbinsand
54fd4f1dd9STim J. Robbins.Fa s2
55fd4f1dd9STim J. Robbinsaccording to the current locale collation order.
56fd4f1dd9STim J. RobbinsIn the
57fd4f1dd9STim J. Robbins.Dq Li C
58fd4f1dd9STim J. Robbinslocale,
59fd4f1dd9STim J. Robbins.Fn wcscoll
60fd4f1dd9STim J. Robbinsis equivalent to
61fd4f1dd9STim J. Robbins.Fn wcscmp .
62fd4f1dd9STim J. Robbins.Sh RETURN VALUES
63fd4f1dd9STim J. RobbinsThe
64fd4f1dd9STim J. Robbins.Fn wcscoll
65fd4f1dd9STim J. Robbinsfunction
66fd4f1dd9STim J. Robbinsreturns an integer greater than, equal to, or less than 0,
67fd4f1dd9STim J. Robbinsif
68fd4f1dd9STim J. Robbins.Fa s1
69fd4f1dd9STim J. Robbinsis greater than, equal to, or less than
70fd4f1dd9STim J. Robbins.Fa s2 .
71fd4f1dd9STim J. Robbins.Pp
72fd4f1dd9STim J. RobbinsNo return value is reserved to indicate errors;
73fd4f1dd9STim J. Robbinscallers should set
74fd4f1dd9STim J. Robbins.Va errno
75fd4f1dd9STim J. Robbinsto 0 before calling
76fd4f1dd9STim J. Robbins.Fn wcscoll .
77fd4f1dd9STim J. RobbinsIf it is non-zero upon return from
78fd4f1dd9STim J. Robbins.Fn wcscoll ,
79fd4f1dd9STim J. Robbinsan error has occurred.
80fd4f1dd9STim J. Robbins.Sh ERRORS
81fd4f1dd9STim J. RobbinsThe
82fd4f1dd9STim J. Robbins.Fn wcscoll
83fd4f1dd9STim J. Robbinsfunction will fail if:
84fd4f1dd9STim J. Robbins.Bl -tag -width Er
85fd4f1dd9STim J. Robbins.It Bq Er EILSEQ
86fd4f1dd9STim J. RobbinsAn invalid wide character code was specified.
87fd4f1dd9STim J. Robbins.It Bq Er ENOMEM
88fd4f1dd9STim J. RobbinsCannot allocate enough memory for temporary buffers.
89fd4f1dd9STim J. Robbins.El
90fd4f1dd9STim J. Robbins.Sh SEE ALSO
91fd4f1dd9STim J. Robbins.Xr setlocale 3 ,
92fd4f1dd9STim J. Robbins.Xr strcoll 3 ,
93fd4f1dd9STim J. Robbins.Xr wcscmp 3 ,
94fd4f1dd9STim J. Robbins.Xr wcsxfrm 3
95fd4f1dd9STim J. Robbins.Sh STANDARDS
96fd4f1dd9STim J. RobbinsThe
97fd4f1dd9STim J. Robbins.Fn wcscoll
98fd4f1dd9STim J. Robbinsfunction
99fd4f1dd9STim J. Robbinsconforms to
100fd4f1dd9STim J. Robbins.St -isoC-99 .
101fd4f1dd9STim J. Robbins.Sh BUGS
102fd4f1dd9STim J. RobbinsThe current implementation of
103fd4f1dd9STim J. Robbins.Fn wcscoll
104fd4f1dd9STim J. Robbinsonly works in single-byte
105fd4f1dd9STim J. Robbins.Dv LC_CTYPE
106fd4f1dd9STim J. Robbinslocales, and falls back to using
107fd4f1dd9STim J. Robbins.Fn wcscmp
108fd4f1dd9STim J. Robbinsin locales with extended character sets.
109