1*3d3c5d42Swiz.\" $NetBSD: wcscoll.3,v 1.3 2010/12/16 17:42:27 wiz Exp $ 265b88fc7Stnozaki.\" 365b88fc7Stnozaki.\" Copyright (c) 1990, 1991, 1993 465b88fc7Stnozaki.\" The Regents of the University of California. All rights reserved. 565b88fc7Stnozaki.\" 665b88fc7Stnozaki.\" This code is derived from software contributed to Berkeley by 765b88fc7Stnozaki.\" Chris Torek and the American National Standards Committee X3, 865b88fc7Stnozaki.\" on Information Processing Systems. 965b88fc7Stnozaki.\" 1065b88fc7Stnozaki.\" Redistribution and use in source and binary forms, with or without 1165b88fc7Stnozaki.\" modification, are permitted provided that the following conditions 1265b88fc7Stnozaki.\" are met: 1365b88fc7Stnozaki.\" 1. Redistributions of source code must retain the above copyright 1465b88fc7Stnozaki.\" notice, this list of conditions and the following disclaimer. 1565b88fc7Stnozaki.\" 2. Redistributions in binary form must reproduce the above copyright 1665b88fc7Stnozaki.\" notice, this list of conditions and the following disclaimer in the 1765b88fc7Stnozaki.\" documentation and/or other materials provided with the distribution. 1865b88fc7Stnozaki.\" 3. All advertising materials mentioning features or use of this software 1965b88fc7Stnozaki.\" must display the following acknowledgement: 2065b88fc7Stnozaki.\" This product includes software developed by the University of 2165b88fc7Stnozaki.\" California, Berkeley and its contributors. 2265b88fc7Stnozaki.\" 4. Neither the name of the University nor the names of its contributors 2365b88fc7Stnozaki.\" may be used to endorse or promote products derived from this software 2465b88fc7Stnozaki.\" without specific prior written permission. 2565b88fc7Stnozaki.\" 2665b88fc7Stnozaki.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2765b88fc7Stnozaki.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2865b88fc7Stnozaki.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2965b88fc7Stnozaki.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 3065b88fc7Stnozaki.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 3165b88fc7Stnozaki.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 3265b88fc7Stnozaki.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 3365b88fc7Stnozaki.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3465b88fc7Stnozaki.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3565b88fc7Stnozaki.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3665b88fc7Stnozaki.\" SUCH DAMAGE. 3765b88fc7Stnozaki.\" 3865b88fc7Stnozaki.\" @(#)strcoll.3 8.1 (Berkeley) 6/4/93 3965b88fc7Stnozaki.\" FreeBSD: src/lib/libc/string/strcoll.3,v 1.11 2001/10/01 16:09:00 ru Exp 4065b88fc7Stnozaki.\" FreeBSD: /repoman/r/ncvs/src/lib/libc/string/wcscoll.3,v 1.2 2002/12/09 14:04:05 ru Exp 4165b88fc7Stnozaki.\" 4265b88fc7Stnozaki.Dd October 13, 2006 4365b88fc7Stnozaki.Dt WCSCOLL 3 4465b88fc7Stnozaki.Os 4565b88fc7Stnozaki.Sh NAME 4665b88fc7Stnozaki.Nm wcscoll 4765b88fc7Stnozaki.Nd compare wide strings according to current collation 4865b88fc7Stnozaki.Sh LIBRARY 4965b88fc7Stnozaki.Lb libc 5065b88fc7Stnozaki.Sh SYNOPSIS 5165b88fc7Stnozaki.In wchar.h 5265b88fc7Stnozaki.Ft int 5365b88fc7Stnozaki.Fn wcscoll "const wchar_t *s1" "const wchar_t *s2" 5465b88fc7Stnozaki.Sh DESCRIPTION 5565b88fc7StnozakiThe 5665b88fc7Stnozaki.Fn wcscoll 57641d5b8aSwizfunction compares the nul-terminated strings 5865b88fc7Stnozaki.Fa s1 5965b88fc7Stnozakiand 6065b88fc7Stnozaki.Fa s2 6165b88fc7Stnozakiaccording to the current locale collation order. 6265b88fc7StnozakiIn the 6365b88fc7Stnozaki.Dq Li C 6465b88fc7Stnozakilocale, 6565b88fc7Stnozaki.Fn wcscoll 6665b88fc7Stnozakiis equivalent to 6765b88fc7Stnozaki.Fn wcscmp . 6865b88fc7Stnozaki.Sh RETURN VALUES 6965b88fc7StnozakiThe 7065b88fc7Stnozaki.Fn wcscoll 71641d5b8aSwizfunction returns an integer greater than, equal to, or less than 72641d5b8aSwiz0, if 7365b88fc7Stnozaki.Fa s1 7465b88fc7Stnozakiis greater than, equal to, or less than 7565b88fc7Stnozaki.Fa s2 . 7665b88fc7Stnozaki.Pp 7765b88fc7StnozakiNo return value is reserved to indicate errors; 7865b88fc7Stnozakicallers should set 7965b88fc7Stnozaki.Va errno 8065b88fc7Stnozakito 0 before calling 8165b88fc7Stnozaki.Fn wcscoll . 8265b88fc7StnozakiIf it is non-zero upon return from 8365b88fc7Stnozaki.Fn wcscoll , 8465b88fc7Stnozakian error has occurred. 8565b88fc7Stnozaki.Sh ERRORS 8665b88fc7StnozakiThe 8765b88fc7Stnozaki.Fn wcscoll 8865b88fc7Stnozakifunction will fail if: 8965b88fc7Stnozaki.Bl -tag -width Er 9065b88fc7Stnozaki.It Bq Er EILSEQ 91*3d3c5d42SwizAn invalid wide-character code was specified. 9265b88fc7Stnozaki.It Bq Er ENOMEM 9365b88fc7StnozakiCannot allocate enough memory for temporary buffers. 9465b88fc7Stnozaki.El 9565b88fc7Stnozaki.Sh SEE ALSO 9665b88fc7Stnozaki.Xr setlocale 3 , 9765b88fc7Stnozaki.Xr strcoll 3 , 9865b88fc7Stnozaki.Xr wcscmp 3 , 9965b88fc7Stnozaki.Xr wcsxfrm 3 10065b88fc7Stnozaki.Sh STANDARDS 10165b88fc7StnozakiThe 10265b88fc7Stnozaki.Fn wcscoll 103641d5b8aSwizfunction conforms to 10465b88fc7Stnozaki.St -isoC-99 . 10565b88fc7Stnozaki.Sh BUGS 10665b88fc7StnozakiThe current implementation of 10765b88fc7Stnozaki.Fn wcscoll 10865b88fc7Stnozakifunction disregards 10965b88fc7Stnozaki.Dv LC_COLLATE 11065b88fc7Stnozakilocales, and falls back to using the 11165b88fc7Stnozaki.Fn wcscmp 11265b88fc7Stnozakifunction. 113