1WCSNCASECMP(3) Linux Programmer's Manual WCSNCASECMP(3)
2
3
4
6 wcsncasecmp - compare two fixed-size wide-character strings, ignoring
7 case
8
10 #include <wchar.h>
11
12 int wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n);
13
14 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
15
16 wcsncasecmp():
17 Since glibc 2.10:
18 _POSIX_C_SOURCE >= 200809L
19 Before glibc 2.10:
20 _GNU_SOURCE
21
23 The wcsncasecmp() function is the wide-character equivalent of the
24 strncasecmp(3) function. It compares the wide-character string pointed
25 to by s1 and the wide-character string pointed to by s2, but at most n
26 wide characters from each string, ignoring case differences (towup‐
27 per(3), towlower(3)).
28
30 The wcsncasecmp() function returns zero if the wide-character strings
31 at s1 and s2, truncated to at most length n, are equal except for case
32 distinctions. It returns a positive integer if truncated s1 is greater
33 than truncated s2, ignoring case. It returns a negative integer if
34 truncated s1 is smaller than truncated s2, ignoring case.
35
37 The wcsncasecmp() function is provided in glibc since version 2.1.
38
40 For an explanation of the terms used in this section, see at‐
41 tributes(7).
42
43 ┌─────────────────────────────────────┬───────────────┬────────────────┐
44 │Interface │ Attribute │ Value │
45 ├─────────────────────────────────────┼───────────────┼────────────────┤
46 │wcsncasecmp() │ Thread safety │ MT-Safe locale │
47 └─────────────────────────────────────┴───────────────┴────────────────┘
48
50 POSIX.1-2008. This function is not specified in POSIX.1-2001, and is
51 not widely available on other systems.
52
54 The behavior of wcsncasecmp() depends on the LC_CTYPE category of the
55 current locale.
56
58 strncasecmp(3), wcsncmp(3)
59
61 This page is part of release 5.13 of the Linux man-pages project. A
62 description of the project, information about reporting bugs, and the
63 latest version of this page, can be found at
64 https://www.kernel.org/doc/man-pages/.
65
66
67
68GNU 2021-03-22 WCSNCASECMP(3)