xref: /openbsd-src/lib/libc/string/wcscmp.3 (revision 64d4e9871d1af4e50715ace8f2f237ff8e4d36e0)
1*64d4e987Stedu.\"	$OpenBSD: wcscmp.3,v 1.3 2013/06/05 03:39:23 tedu Exp $
28c40de08Sschwarze.\"
37042370eSnicm.\" Copyright (c) 1990, 1991 The Regents of the University of California.
47042370eSnicm.\" All rights reserved.
57042370eSnicm.\"
67042370eSnicm.\" This code is derived from software contributed to Berkeley by
77042370eSnicm.\" Chris Torek and the American National Standards Committee X3,
87042370eSnicm.\" on Information Processing Systems.
97042370eSnicm.\"
107042370eSnicm.\" Redistribution and use in source and binary forms, with or without
117042370eSnicm.\" modification, are permitted provided that the following conditions
127042370eSnicm.\" are met:
137042370eSnicm.\" 1. Redistributions of source code must retain the above copyright
147042370eSnicm.\"    notice, this list of conditions and the following disclaimer.
157042370eSnicm.\" 2. Redistributions in binary form must reproduce the above copyright
167042370eSnicm.\"    notice, this list of conditions and the following disclaimer in the
177042370eSnicm.\"    documentation and/or other materials provided with the distribution.
187042370eSnicm.\" 3. Neither the name of the University nor the names of its contributors
197042370eSnicm.\"    may be used to endorse or promote products derived from this software
207042370eSnicm.\"    without specific prior written permission.
217042370eSnicm.\"
227042370eSnicm.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
237042370eSnicm.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
247042370eSnicm.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
257042370eSnicm.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
267042370eSnicm.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
277042370eSnicm.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
287042370eSnicm.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
297042370eSnicm.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
307042370eSnicm.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
317042370eSnicm.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
327042370eSnicm.\" SUCH DAMAGE.
337042370eSnicm.\"
34*64d4e987Stedu.Dd $Mdocdate: June 5 2013 $
357042370eSnicm.Dt WCSCMP 3
367042370eSnicm.Os
377042370eSnicm.Sh NAME
387042370eSnicm.Nm wcscmp ,
397042370eSnicm.Nm wcsncmp
407042370eSnicm.Nd compare wide strings
417042370eSnicm.Sh SYNOPSIS
42*64d4e987Stedu.In wchar.h
437042370eSnicm.Ft int
447042370eSnicm.Fn wcscmp "const wchar_t *s1" "const wchar_t *s2"
457042370eSnicm.Ft int
467042370eSnicm.Fn wcsncmp "const wchar_t *s1" "const wchar_t *s2" "size_t len"
477042370eSnicm.Sh DESCRIPTION
487042370eSnicmThe
497042370eSnicm.Fn wcscmp
507042370eSnicmand
517042370eSnicm.Fn wcsncmp
527042370eSnicmfunctions lexicographically compare the wide strings
537042370eSnicm.Fa s1
547042370eSnicmand
557042370eSnicm.Fa s2 .
567042370eSnicmThe
577042370eSnicm.Fn wcsncmp
588c40de08Sschwarzefunction compares at most
597042370eSnicm.Fa len
607042370eSnicmwide characters.
617042370eSnicm.Sh RETURN VALUES
627042370eSnicmThe
637042370eSnicm.Fn wcscmp
647042370eSnicmand
657042370eSnicm.Fn wcsncmp
667042370eSnicmfunctions return an integer greater than, equal to, or less than 0, according
677042370eSnicmto whether the wide string
687042370eSnicm.Fa s1
697042370eSnicmis greater than, equal to, or less than the wide string
707042370eSnicm.Fa s2 .
717042370eSnicm.Sh SEE ALSO
728c40de08Sschwarze.Xr strcmp 3 ,
737042370eSnicm.Xr wcscasecmp 3 ,
747042370eSnicm.Xr wmemcmp 3
757042370eSnicm.Sh STANDARDS
767042370eSnicmThe
777042370eSnicm.Fn wcscmp
787042370eSnicmand
797042370eSnicm.Fn wcsncmp
807042370eSnicmfunctions conform to
817042370eSnicm.St -isoC-99
827042370eSnicmand were first introduced in
837042370eSnicm.St -isoC-amd1 .
848c40de08Sschwarze.Sh HISTORY
858c40de08SschwarzeThe
868c40de08Sschwarze.Fn wcscmp
878c40de08Sschwarzeand
888c40de08Sschwarze.Fn wcsncmp
898c40de08Sschwarzefunctions were ported from
908c40de08Sschwarze.Nx
918c40de08Sschwarzeand first appeared in
928c40de08Sschwarze.Ox 3.8 .
93