]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/wcsncmp.3
Import of man-pages 1.70
[thirdparty/man-pages.git] / man3 / wcsncmp.3
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
7 .\"
8 .\" References consulted:
9 .\" GNU glibc-2 source code and manual
10 .\" Dinkumware C library reference http://www.dinkumware.com/
11 .\" OpenGroup's Single Unix specification http://www.UNIX-systems.org/online.html
12 .\" ISO/IEC 9899:1999
13 .\"
14 .TH WCSNCMP 3 1999-07-25 "GNU" "Linux Programmer's Manual"
15 .SH NAME
16 wcsncmp \- compare two fixed-size wide-character strings
17 .SH SYNOPSIS
18 .nf
19 .B #include <wchar.h>
20 .sp
21 .BI "int wcsncmp(const wchar_t *" s1 ", const wchar_t *" s2 ", size_t " n );
22 .fi
23 .SH DESCRIPTION
24 The \fBwcsncmp\fP function is the wide-character equivalent of the \fBstrncmp\fP
25 function. It compares the wide-character string pointed to by \fIs1\fP and the
26 wide-character string pointed to by \fIs2\fP, but at most \fIn\fP wide
27 characters from each string. In each string, the comparison extends only up
28 to the first occurrence of a L'\\0' character, if any.
29 .SH "RETURN VALUE"
30 The \fBwcsncmp\fP function returns zero if the wide-character strings at
31 \fIs1\fP and \fIs2\fP, truncated to at most length \fIn\fP, are equal.
32 It returns an integer greater than zero if at the first differing position
33 \fIi\fP (\fIi\fP < \fIn\fP), the corresponding wide-character \fIs1[i]\fP is
34 greater than \fIs2[i]\fP. It returns an integer less than zero if at the first
35 differing position \fIi\fP (\fIi\fP < \fIn\fP), the corresponding
36 wide-character \fIs1[i]\fP is less than \fIs2[i]\fP.
37 .SH "CONFORMING TO"
38 ISO/ANSI C, UNIX98
39 .SH "SEE ALSO"
40 .BR strncmp (3),
41 .BR wcsncasecmp (3)