]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/wcsncmp.3
Many pages: Use correct letter case in page titles (TH)
[thirdparty/man-pages.git] / man3 / wcsncmp.3
CommitLineData
fea681da
MK
1.\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2.\"
e4a74ca8 3.\" SPDX-License-Identifier: GPL-2.0-or-later
fea681da
MK
4.\"
5.\" References consulted:
6.\" GNU glibc-2 source code and manual
7.\" Dinkumware C library reference http://www.dinkumware.com/
008f1ecc 8.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
fea681da
MK
9.\" ISO/IEC 9899:1999
10.\"
4c1c5274 11.TH wcsncmp 3 (date) "Linux man-pages (unreleased)"
fea681da
MK
12.SH NAME
13wcsncmp \- compare two fixed-size wide-character strings
92041374
AC
14.SH LIBRARY
15Standard C library
8fc3b2cf 16.RI ( libc ", " \-lc )
fea681da
MK
17.SH SYNOPSIS
18.nf
19.B #include <wchar.h>
68e4db0a 20.PP
fea681da
MK
21.BI "int wcsncmp(const wchar_t *" s1 ", const wchar_t *" s2 ", size_t " n );
22.fi
23.SH DESCRIPTION
60a90ecd
MK
24The
25.BR wcsncmp ()
26function is the wide-character equivalent of the
27.BR strncmp (3)
28function.
40aa0db0
MK
29It compares the wide-character string pointed to by
30.I s1
31and the
32wide-character string pointed to by
33.IR s2 ,
34but at most
35.I n
36wide
c13182ef
MK
37characters from each string.
38In each string, the comparison extends only up
d1a71985 39to the first occurrence of a null wide character (L\(aq\e0\(aq), if any.
47297adb 40.SH RETURN VALUE
60a90ecd
MK
41The
42.BR wcsncmp ()
43function returns zero if the wide-character strings at
40aa0db0
MK
44.I s1
45and
46.IR s2 ,
47truncated to at most length
48.IR n ,
49are equal.
fea681da 50It returns an integer greater than zero if at the first differing position
40aa0db0
MK
51.I i
52.RI ( i
53<
54.IR n ),
55the corresponding wide-character
56.I s1[i]
57is
58greater than
59.IR s2[i] .
c13182ef 60It returns an integer less than zero if at the first
40aa0db0
MK
61differing position
62.I i
2d20cb1b 63.RI ( i
40aa0db0
MK
64<
65.IR n ),
66the corresponding
67wide-character
68.I s1[i]
69is less than
70.IR s2[i] .
c5880ed9 71.SH ATTRIBUTES
a13ca72f
PH
72For an explanation of the terms used in this section, see
73.BR attributes (7).
c466875e
MK
74.ad l
75.nh
a13ca72f
PH
76.TS
77allbox;
c466875e 78lbx lb lb
a13ca72f
PH
79l l l.
80Interface Attribute Value
81T{
c5880ed9 82.BR wcsncmp ()
a13ca72f
PH
83T} Thread safety MT-Safe
84.TE
c466875e
MK
85.hy
86.ad
87.sp 1
3113c7f3 88.SH STANDARDS
d6597cb0 89POSIX.1-2001, POSIX.1-2008, C99.
47297adb 90.SH SEE ALSO
fea681da
MK
91.BR strncmp (3),
92.BR wcsncasecmp (3)