1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
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.
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
14 .TH WCSNCMP 3 2011-09-28 "GNU" "Linux Programmer's Manual"
16 wcsncmp \- compare two fixed-size wide-character strings
21 .BI "int wcsncmp(const wchar_t *" s1 ", const wchar_t *" s2 ", size_t " n );
26 function is the wide-character equivalent of the
29 It compares the wide-character string pointed to by \fIs1\fP and the
30 wide-character string pointed to by \fIs2\fP, but at most \fIn\fP wide
31 characters from each string.
32 In each string, the comparison extends only up
33 to the first occurrence of a nulll wide character (L\(aq\\0\(aq), if any.
37 function returns zero if the wide-character strings at
38 \fIs1\fP and \fIs2\fP, truncated to at most length \fIn\fP, are equal.
39 It returns an integer greater than zero if at the first differing position
40 \fIi\fP (\fIi\fP < \fIn\fP),
41 the corresponding wide-character \fIs1[i]\fP is
42 greater than \fIs2[i]\fP.
43 It returns an integer less than zero if at the first
44 differing position \fIi\fP (\fIi\fP < \fIn\fP), the corresponding
45 wide-character \fIs1[i]\fP is less than \fIs2[i]\fP.