memfd_secret.2: SEE ALSO: add memfd_create(2)
[man-pages.git] / man3 / wcsncasecmp.3
blob0d4cb24c4335b58a8321a29f7797fc60b51fee5a
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
3 .\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\" %%%LICENSE_END
9 .\"
10 .\" References consulted:
11 .\"   GNU glibc-2 source code and manual
12 .\"   Dinkumware C library reference http://www.dinkumware.com/
13 .\"   OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
14 .\"
15 .TH WCSNCASECMP 3 2021-03-22 "GNU" "Linux Programmer's Manual"
16 .SH NAME
17 wcsncasecmp \- compare two fixed-size wide-character strings, ignoring case
18 .SH SYNOPSIS
19 .nf
20 .B #include <wchar.h>
21 .PP
22 .BI "int wcsncasecmp(const wchar_t *" s1 ", const wchar_t *" s2 ", size_t " n );
23 .fi
24 .PP
25 .RS -4
26 Feature Test Macro Requirements for glibc (see
27 .BR feature_test_macros (7)):
28 .RE
29 .PP
30 .BR wcsncasecmp ():
31 .nf
32     Since glibc 2.10:
33         _POSIX_C_SOURCE >= 200809L
34     Before glibc 2.10:
35         _GNU_SOURCE
36 .fi
37 .SH DESCRIPTION
38 The
39 .BR wcsncasecmp ()
40 function is the wide-character equivalent of the
41 .BR strncasecmp (3)
42 function.
43 It compares the wide-character string pointed to
45 .I s1
46 and the wide-character string
47 pointed to by
48 .IR s2 ,
49 but at most
50 .I n
51 wide characters from each string, ignoring case differences
52 .RB ( towupper (3),
53 .BR towlower (3)).
54 .SH RETURN VALUE
55 The
56 .BR wcsncasecmp ()
57 function returns zero
58 if the wide-character strings at
59 .I s1
60 and
61 .IR s2 ,
62 truncated to at most length
63 .IR n ,
64 are equal except
65 for case distinctions.
66 It returns a positive integer if truncated
67 .I s1
69 greater than truncated
70 .IR s2 ,
71 ignoring case.
72 It returns a negative integer
73 if truncated
74 .I s1
75 is smaller than truncated
76 .IR s2 ,
77 ignoring case.
78 .SH VERSIONS
79 The
80 .BR wcsncasecmp ()
81 function is provided in glibc since version 2.1.
82 .SH ATTRIBUTES
83 For an explanation of the terms used in this section, see
84 .BR attributes (7).
85 .ad l
86 .nh
87 .TS
88 allbox;
89 lbx lb lb
90 l l l.
91 Interface       Attribute       Value
93 .BR wcsncasecmp ()
94 T}      Thread safety   MT-Safe locale
95 .TE
96 .hy
97 .ad
98 .sp 1
99 .SH CONFORMING TO
100 POSIX.1-2008.
101 This function is not specified in POSIX.1-2001,
102 and is not widely available on other systems.
103 .SH NOTES
104 The behavior of
105 .BR wcsncasecmp ()
106 depends on the
107 .B LC_CTYPE
108 category of the
109 current locale.
110 .SH SEE ALSO
111 .BR strncasecmp (3),
112 .BR wcsncmp (3)