1*8fb85c7dSschwarze.\" $OpenBSD: wcscoll.3,v 1.2 2019/01/18 07:43:36 schwarze Exp $ 23a628b46Sschwarze.\" 33a628b46Sschwarze.\" Copyright (c) 1990, 1991 The Regents of the University of California. 43a628b46Sschwarze.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org> 53a628b46Sschwarze.\" All rights reserved. 63a628b46Sschwarze.\" 73a628b46Sschwarze.\" This code is derived from software contributed to Berkeley by 83a628b46Sschwarze.\" Chris Torek and the American National Standards Committee X3, 93a628b46Sschwarze.\" on Information Processing Systems. 103a628b46Sschwarze.\" 113a628b46Sschwarze.\" Redistribution and use in source and binary forms, with or without 123a628b46Sschwarze.\" modification, are permitted provided that the following conditions 133a628b46Sschwarze.\" are met: 143a628b46Sschwarze.\" 1. Redistributions of source code must retain the above copyright 153a628b46Sschwarze.\" notice, this list of conditions and the following disclaimer. 163a628b46Sschwarze.\" 2. Redistributions in binary form must reproduce the above copyright 173a628b46Sschwarze.\" notice, this list of conditions and the following disclaimer in the 183a628b46Sschwarze.\" documentation and/or other materials provided with the distribution. 193a628b46Sschwarze.\" 3. Neither the name of the University nor the names of its contributors 203a628b46Sschwarze.\" may be used to endorse or promote products derived from this software 213a628b46Sschwarze.\" without specific prior written permission. 223a628b46Sschwarze.\" 233a628b46Sschwarze.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 243a628b46Sschwarze.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 253a628b46Sschwarze.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 263a628b46Sschwarze.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 273a628b46Sschwarze.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 283a628b46Sschwarze.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 293a628b46Sschwarze.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 303a628b46Sschwarze.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 313a628b46Sschwarze.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 323a628b46Sschwarze.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 333a628b46Sschwarze.\" SUCH DAMAGE. 343a628b46Sschwarze.\" 35*8fb85c7dSschwarze.Dd $Mdocdate: January 18 2019 $ 363a628b46Sschwarze.Dt WCSCOLL 3 373a628b46Sschwarze.Os 383a628b46Sschwarze.Sh NAME 393a628b46Sschwarze.Nm wcscoll , 403a628b46Sschwarze.Nm wcscoll_l 413a628b46Sschwarze.Nd compare wide strings according to the current collation 423a628b46Sschwarze.Sh SYNOPSIS 433a628b46Sschwarze.In wchar.h 443a628b46Sschwarze.Ft int 453a628b46Sschwarze.Fn wcscoll "const wchar_t *s1" "const wchar_t *s2" 463a628b46Sschwarze.Ft int 473a628b46Sschwarze.Fn wcscoll_l "const wchar_t *s1" "const wchar_t *s2" "locale_t locale" 483a628b46Sschwarze.Sh DESCRIPTION 493a628b46SschwarzeThe 503a628b46Sschwarze.Fn wcscoll 513a628b46Sschwarzeand 523a628b46Sschwarze.Fn wcscoll_l 533a628b46Sschwarzefunctions lexicographically compare the NUL-terminated wide strings 543a628b46Sschwarze.Fa s1 553a628b46Sschwarzeand 563a628b46Sschwarze.Fa s2 573a628b46Sschwarzeaccording to the current locale collation 583a628b46Sschwarzeand return an integer greater than, equal to, or less than 0, 593a628b46Sschwarzeaccording to whether 603a628b46Sschwarze.Fa s1 613a628b46Sschwarzeis greater than, equal to, or less than 623a628b46Sschwarze.Fa s2 . 633a628b46Sschwarze.Pp 643a628b46SschwarzeOn 653a628b46Sschwarze.Ox , 663a628b46Sschwarzethey have the same effect as 673a628b46Sschwarze.Xr wcscmp 3 , 683a628b46Sschwarzeand the global locale, the thread-specific locale, and the 693a628b46Sschwarze.Fa locale 703a628b46Sschwarzeargument are ignored. 71*8fb85c7dSschwarzeOn other operating systems, the results may depend on the 723a628b46Sschwarze.Dv LC_CTYPE 73*8fb85c7dSschwarzeand 74*8fb85c7dSschwarze.Dv LC_COLLATE 75*8fb85c7dSschwarzelocale categories set with 76*8fb85c7dSschwarze.Xr setlocale 3 , 77*8fb85c7dSschwarze.Xr uselocale 3 , 78*8fb85c7dSschwarzeor 79*8fb85c7dSschwarze.Xr newlocale 3 . 803a628b46Sschwarze.Sh SEE ALSO 813a628b46Sschwarze.Xr newlocale 3 , 823a628b46Sschwarze.Xr setlocale 3 , 833a628b46Sschwarze.Xr wcscmp 3 , 843a628b46Sschwarze.Xr wcsxfrm 3 853a628b46Sschwarze.Sh STANDARDS 863a628b46SschwarzeThe 873a628b46Sschwarze.Fn wcscoll 883a628b46Sschwarzefunction conforms to 893a628b46Sschwarze.St -isoC-99 , 903a628b46Sschwarzeand 913a628b46Sschwarze.Fn wcscoll_l 923a628b46Sschwarzeto 933a628b46Sschwarze.St -p1003.1-2008 . 943a628b46Sschwarze.Sh HISTORY 953a628b46SschwarzeThe 963a628b46Sschwarze.Fn wcscoll 973a628b46Sschwarzefunction has been available since 983a628b46Sschwarze.Ox 4.8 , 993a628b46Sschwarzeand 1003a628b46Sschwarze.Fn wcscoll_l 1013a628b46Sschwarzesince 1023a628b46Sschwarze.Ox 6.2 . 103