Debian Codegraph @

upstream/debian-unstable/man3/wcscmp.3

raw
1 '\" t
2 .\" Copyright, Bruno Haible <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: GPL-2.0-or-later
6 .\"
7 .TH wcscmp 3 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 wcscmp \- compare two wide-character strings
10 .SH LIBRARY
11 Standard C library
12 .RI ( libc ,\~ \-lc )
13 .SH SYNOPSIS
14 .nf
15 .B #include <wchar.h>
16 .P
17 .BI "int wcscmp(const wchar_t *" s1 ", const wchar_t *" s2 );
18 .fi
19 .SH DESCRIPTION
20 The
21 .BR wcscmp ()
22 function is the wide-character equivalent
23 of the
24 .BR strcmp (3)
25 function.
26 It compares the wide-character string pointed to by
27 .I s1
28 and the
29 wide-character string pointed to by
30 .IR s2 .
31 .SH RETURN VALUE
32 The
33 .BR wcscmp ()
34 function returns zero if the wide-character strings at
35 .I s1
36 and
37 .I s2
38 are equal.
39 It returns an integer greater than zero if
40 at the first differing position
41 .IR i ,
42 the corresponding wide-character
43 .I s1[i]
44 is greater than
45 .IR s2[i] .
46 It returns an integer less than zero if
47 at the first differing position
48 .IR i ,
49 the corresponding wide-character
50 .I s1[i]
51 is less than
52 .IR s2[i] .
53 .SH ATTRIBUTES
54 For an explanation of the terms used in this section, see
55 .BR attributes (7).
56 .TS
57 allbox;
58 lbx lb lb
59 l l l.
60 Interface Attribute Value
61 T{
62 .na
63 .nh
64 .BR wcscmp ()
65 T} Thread safety MT-Safe
66 .TE
67 .SH STANDARDS
68 C11, POSIX.1-2008.
69 .SH HISTORY
70 POSIX.1-2001, C99.
71 .SH SEE ALSO
72 .BR strcmp (3),
73 .BR wcscasecmp (3),
74 .BR wmemcmp (3)