]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/wcscmp.3
ed4ca48f2d1fd9519254b8fdc7e47b0546403a74
[thirdparty/man-pages.git] / man3 / wcscmp.3
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
3 .\" SPDX-License-Identifier: GPL-2.0-or-later
4 .\"
5 .\" References consulted:
6 .\" GNU glibc-2 source code and manual
7 .\" Dinkumware C library reference http://www.dinkumware.com/
8 .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
9 .\" ISO/IEC 9899:1999
10 .\"
11 .TH WCSCMP 3 2021-03-22 "Linux man-pages (unreleased)" "Linux Programmer's Manual"
12 .SH NAME
13 wcscmp \- compare two wide-character strings
14 .SH LIBRARY
15 Standard C library
16 .RI ( libc ", " \-lc )
17 .SH SYNOPSIS
18 .nf
19 .B #include <wchar.h>
20 .PP
21 .BI "int wcscmp(const wchar_t *" s1 ", const wchar_t *" s2 );
22 .fi
23 .SH DESCRIPTION
24 The
25 .BR wcscmp ()
26 function is the wide-character equivalent
27 of the
28 .BR strcmp (3)
29 function.
30 It compares the wide-character string pointed to by
31 .I s1
32 and the
33 wide-character string pointed to by
34 .IR s2 .
35 .SH RETURN VALUE
36 The
37 .BR wcscmp ()
38 function returns zero if the wide-character strings at
39 .I s1
40 and
41 .I s2
42 are equal.
43 It returns an integer greater than zero if
44 at the first differing position
45 .IR i ,
46 the corresponding wide-character
47 .I s1[i]
48 is greater than
49 .IR s2[i] .
50 It returns an integer less than zero if
51 at the first differing position
52 .IR i ,
53 the corresponding wide-character
54 .I s1[i]
55 is less than
56 .IR s2[i] .
57 .SH ATTRIBUTES
58 For an explanation of the terms used in this section, see
59 .BR attributes (7).
60 .ad l
61 .nh
62 .TS
63 allbox;
64 lbx lb lb
65 l l l.
66 Interface Attribute Value
67 T{
68 .BR wcscmp ()
69 T} Thread safety MT-Safe
70 .TE
71 .hy
72 .ad
73 .sp 1
74 .SH STANDARDS
75 POSIX.1-2001, POSIX.1-2008, C99.
76 .SH SEE ALSO
77 .BR strcmp (3),
78 .BR wcscasecmp (3),
79 .BR wmemcmp (3)