]>
Commit | Line | Data |
---|---|---|
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 |
15 | wcsncasecmp \- 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 | |
24 | Feature 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 | |
33 | Since glibc 2.10: | |
34 | _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L | |
35 | .TP | |
df362fbf MK |
36 | Before glibc 2.10: |
37 | _GNU_SOURCE | |
ea91c3fd MK |
38 | .RE |
39 | .ad | |
40 | .PD | |
fea681da | 41 | .SH DESCRIPTION |
60a90ecd MK |
42 | The |
43 | .BR wcsncasecmp () | |
44 | function is the wide-character equivalent of the | |
45 | .BR strncasecmp (3) | |
46 | function. | |
c13182ef MK |
47 | It compares the wide-character string pointed to |
48 | by \fIs1\fP and the wide-character string | |
49 | pointed 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 |
54 | The |
55 | .BR wcsncasecmp () | |
56 | function returns zero | |
c13182ef MK |
57 | if the wide-character strings at |
58 | \fIs1\fP and \fIs2\fP, | |
59 | truncated to at most length \fIn\fP, are equal except | |
60 | for case distinctions. | |
61 | It returns a positive integer if truncated \fIs1\fP is | |
62 | greater than truncated \fIs2\fP, ignoring case. | |
63 | It returns a negative integer | |
fea681da | 64 | if truncated \fIs1\fP is smaller than truncated \fIs2\fP, ignoring case. |
51d42330 MK |
65 | .SH VERSIONS |
66 | The | |
67 | .BR wcsncasecmp () | |
68 | function is provided in glibc since version 2.1. | |
fea681da | 69 | .SH "CONFORMING TO" |
d9a56b2e MK |
70 | POSIX.1-2008. |
71 | This function is not specified in POSIX.1-2001, | |
72 | and is not widely available on other systems. | |
fea681da | 73 | .SH NOTES |
d9bfdb9c | 74 | The behavior of |
60a90ecd | 75 | .BR wcsncasecmp () |
1274071a MK |
76 | depends on the |
77 | .B LC_CTYPE | |
78 | category of the | |
fea681da | 79 | current locale. |
e37e3282 MK |
80 | .SH "SEE ALSO" |
81 | .BR strncasecmp (3), | |
82 | .BR wcsncmp (3) |