]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/wcsncasecmp.3
intro.1, time.1, accept.2, bind.2, connect.2, execve.2, flock.2, getdents.2, getprior...
[thirdparty/man-pages.git] / man3 / wcsncasecmp.3
CommitLineData
fea681da
MK
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/
008f1ecc 11.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
fea681da 12.\"
df362fbf 13.TH WCSNCASECMP 3 2010-09-15 "GNU" "Linux Programmer's Manual"
fea681da
MK
14.SH NAME
15wcsncasecmp \- compare two fixed-size wide-character strings, ignoring case
16.SH SYNOPSIS
17.nf
18.B #include <wchar.h>
19.sp
20.BI "int wcsncasecmp(const wchar_t *" s1 ", const wchar_t *" s2 ", size_t " n );
21.fi
df362fbf
MK
22.sp
23.in -4n
24Feature Test Macro Requirements for glibc (see
25.BR feature_test_macros (7)):
26.in
27.sp
28.BR wcsncasecmp ():
ea91c3fd
MK
29.PD 0
30.ad l
31.RS 4
32.TP 4
33Since glibc 2.10:
34_XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
35.TP
df362fbf
MK
36Before glibc 2.10:
37_GNU_SOURCE
ea91c3fd
MK
38.RE
39.ad
40.PD
fea681da 41.SH DESCRIPTION
60a90ecd
MK
42The
43.BR wcsncasecmp ()
44function is the wide-character equivalent of the
45.BR strncasecmp (3)
46function.
c13182ef
MK
47It compares the wide-character string pointed to
48by \fIs1\fP and the wide-character string
49pointed to by \fIs2\fP, but at most
fea681da 50\fIn\fP wide characters from each string, ignoring case differences
60a90ecd
MK
51.RB ( towupper (3),
52.BR towlower (3)).
fea681da 53.SH "RETURN VALUE"
60a90ecd
MK
54The
55.BR wcsncasecmp ()
56function returns zero
c13182ef
MK
57if the wide-character strings at
58\fIs1\fP and \fIs2\fP,
59truncated to at most length \fIn\fP, are equal except
60for case distinctions.
61It returns a positive integer if truncated \fIs1\fP is
62greater than truncated \fIs2\fP, ignoring case.
63It returns a negative integer
fea681da 64if truncated \fIs1\fP is smaller than truncated \fIs2\fP, ignoring case.
51d42330
MK
65.SH VERSIONS
66The
67.BR wcsncasecmp ()
68function is provided in glibc since version 2.1.
fea681da 69.SH "CONFORMING TO"
d9a56b2e
MK
70POSIX.1-2008.
71This function is not specified in POSIX.1-2001,
72and is not widely available on other systems.
fea681da 73.SH NOTES
d9bfdb9c 74The behavior of
60a90ecd 75.BR wcsncasecmp ()
1274071a
MK
76depends on the
77.B LC_CTYPE
78category of the
fea681da 79current locale.
e37e3282
MK
80.SH "SEE ALSO"
81.BR strncasecmp (3),
82.BR wcsncmp (3)