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