|
Packit |
7cfc04 |
.\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
|
|
Packit |
7cfc04 |
.\"
|
|
Packit |
7cfc04 |
.\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
|
|
Packit |
7cfc04 |
.\" This is free documentation; you can redistribute it and/or
|
|
Packit |
7cfc04 |
.\" modify it under the terms of the GNU General Public License as
|
|
Packit |
7cfc04 |
.\" published by the Free Software Foundation; either version 2 of
|
|
Packit |
7cfc04 |
.\" the License, or (at your option) any later version.
|
|
Packit |
7cfc04 |
.\" %%%LICENSE_END
|
|
Packit |
7cfc04 |
.\"
|
|
Packit |
7cfc04 |
.\" References consulted:
|
|
Packit |
7cfc04 |
.\" GNU glibc-2 source code and manual
|
|
Packit |
7cfc04 |
.\" Dinkumware C library reference http://www.dinkumware.com/
|
|
Packit |
7cfc04 |
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
|
|
Packit |
7cfc04 |
.\" ISO/IEC 9899:1999
|
|
Packit |
7cfc04 |
.\"
|
|
Packit |
7cfc04 |
.TH WCSNCMP 3 2015-08-08 "GNU" "Linux Programmer's Manual"
|
|
Packit |
7cfc04 |
.SH NAME
|
|
Packit |
7cfc04 |
wcsncmp \- compare two fixed-size wide-character strings
|
|
Packit |
7cfc04 |
.SH SYNOPSIS
|
|
Packit |
7cfc04 |
.nf
|
|
Packit |
7cfc04 |
.B #include <wchar.h>
|
|
Packit |
7cfc04 |
.PP
|
|
Packit |
7cfc04 |
.BI "int wcsncmp(const wchar_t *" s1 ", const wchar_t *" s2 ", size_t " n );
|
|
Packit |
7cfc04 |
.fi
|
|
Packit |
7cfc04 |
.SH DESCRIPTION
|
|
Packit |
7cfc04 |
The
|
|
Packit |
7cfc04 |
.BR wcsncmp ()
|
|
Packit |
7cfc04 |
function is the wide-character equivalent of the
|
|
Packit |
7cfc04 |
.BR strncmp (3)
|
|
Packit |
7cfc04 |
function.
|
|
Packit |
7cfc04 |
It compares the wide-character string pointed to by
|
|
Packit |
7cfc04 |
.I s1
|
|
Packit |
7cfc04 |
and the
|
|
Packit |
7cfc04 |
wide-character string pointed to by
|
|
Packit |
7cfc04 |
.IR s2 ,
|
|
Packit |
7cfc04 |
but at most
|
|
Packit |
7cfc04 |
.I n
|
|
Packit |
7cfc04 |
wide
|
|
Packit |
7cfc04 |
characters from each string.
|
|
Packit |
7cfc04 |
In each string, the comparison extends only up
|
|
Packit |
7cfc04 |
to the first occurrence of a null wide character (L\(aq\\0\(aq), if any.
|
|
Packit |
7cfc04 |
.SH RETURN VALUE
|
|
Packit |
7cfc04 |
The
|
|
Packit |
7cfc04 |
.BR wcsncmp ()
|
|
Packit |
7cfc04 |
function returns zero if the wide-character strings at
|
|
Packit |
7cfc04 |
.I s1
|
|
Packit |
7cfc04 |
and
|
|
Packit |
7cfc04 |
.IR s2 ,
|
|
Packit |
7cfc04 |
truncated to at most length
|
|
Packit |
7cfc04 |
.IR n ,
|
|
Packit |
7cfc04 |
are equal.
|
|
Packit |
7cfc04 |
It returns an integer greater than zero if at the first differing position
|
|
Packit |
7cfc04 |
.I i
|
|
Packit |
7cfc04 |
.RI ( i
|
|
Packit |
7cfc04 |
<
|
|
Packit |
7cfc04 |
.IR n ),
|
|
Packit |
7cfc04 |
the corresponding wide-character
|
|
Packit |
7cfc04 |
.I s1[i]
|
|
Packit |
7cfc04 |
is
|
|
Packit |
7cfc04 |
greater than
|
|
Packit |
7cfc04 |
.IR s2[i] .
|
|
Packit |
7cfc04 |
It returns an integer less than zero if at the first
|
|
Packit |
7cfc04 |
differing position
|
|
Packit |
7cfc04 |
.I i
|
|
Packit |
7cfc04 |
.RI (i
|
|
Packit |
7cfc04 |
<
|
|
Packit |
7cfc04 |
.IR n ),
|
|
Packit |
7cfc04 |
the corresponding
|
|
Packit |
7cfc04 |
wide-character
|
|
Packit |
7cfc04 |
.I s1[i]
|
|
Packit |
7cfc04 |
is less than
|
|
Packit |
7cfc04 |
.IR s2[i] .
|
|
Packit |
7cfc04 |
.SH ATTRIBUTES
|
|
Packit |
7cfc04 |
For an explanation of the terms used in this section, see
|
|
Packit |
7cfc04 |
.BR attributes (7).
|
|
Packit |
7cfc04 |
.TS
|
|
Packit |
7cfc04 |
allbox;
|
|
Packit |
7cfc04 |
lb lb lb
|
|
Packit |
7cfc04 |
l l l.
|
|
Packit |
7cfc04 |
Interface Attribute Value
|
|
Packit |
7cfc04 |
T{
|
|
Packit |
7cfc04 |
.BR wcsncmp ()
|
|
Packit |
7cfc04 |
T} Thread safety MT-Safe
|
|
Packit |
7cfc04 |
.TE
|
|
Packit |
7cfc04 |
.SH CONFORMING TO
|
|
Packit |
7cfc04 |
POSIX.1-2001, POSIX.1-2008, C99.
|
|
Packit |
7cfc04 |
.SH SEE ALSO
|
|
Packit |
7cfc04 |
.BR strncmp (3),
|
|
Packit |
7cfc04 |
.BR wcsncasecmp (3)
|
|
Packit |
7cfc04 |
.SH COLOPHON
|
|
Packit |
7cfc04 |
This page is part of release 4.15 of the Linux
|
|
Packit |
7cfc04 |
.I man-pages
|
|
Packit |
7cfc04 |
project.
|
|
Packit |
7cfc04 |
A description of the project,
|
|
Packit |
7cfc04 |
information about reporting bugs,
|
|
Packit |
7cfc04 |
and the latest version of this page,
|
|
Packit |
7cfc04 |
can be found at
|
|
Packit |
7cfc04 |
\%https://www.kernel.org/doc/man\-pages/.
|