| 1 |
'\" t |
| 2 |
.\" Copyright, Bruno Haible <[email protected]> |
| 3 |
.\" Copyright, the authors of the Linux man-pages project |
| 4 |
.\" |
| 5 |
.\" SPDX-License-Identifier: GPL-2.0-or-later |
| 6 |
.\" |
| 7 |
.TH wcscasecmp 3 2026-02-08 "Linux man-pages 6.18" |
| 8 |
.SH NAME |
| 9 |
wcscasecmp, |
| 10 |
wcsncasecmp |
| 11 |
\- |
| 12 |
compare two 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 |
.P |
| 20 |
.BI "int wcscasecmp(const wchar_t *" s1 ", const wchar_t *" s2 ); |
| 21 |
.BI "int wcsncasecmp(const wchar_t " s1 "[], const wchar_t " s2 "[], size_t " n ); |
| 22 |
.fi |
| 23 |
.P |
| 24 |
.RS -4 |
| 25 |
Feature Test Macro Requirements for glibc (see |
| 26 |
.BR feature_test_macros (7)): |
| 27 |
.RE |
| 28 |
.P |
| 29 |
.BR wcscasecmp (), |
| 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 wcscasecmp () |
| 40 |
function is the wide-character equivalent of the |
| 41 |
.BR strcasecmp (3) |
| 42 |
function. |
| 43 |
It compares the wide-character string pointed to |
| 44 |
by |
| 45 |
.I s1 |
| 46 |
and the wide-character string pointed to by |
| 47 |
.IR s2 , |
| 48 |
ignoring |
| 49 |
case differences |
| 50 |
.RB ( towupper (3), |
| 51 |
.BR towlower (3)). |
| 52 |
.P |
| 53 |
The |
| 54 |
.BR wcsncasecmp () |
| 55 |
function is similar |
| 56 |
(the wide-character equivalent of |
| 57 |
.BR strncasecmp (3)), |
| 58 |
except that it compares no more than |
| 59 |
.I n |
| 60 |
wide characters of |
| 61 |
.I s1 |
| 62 |
and |
| 63 |
.IR s2 . |
| 64 |
.SH RETURN VALUE |
| 65 |
The |
| 66 |
.BR wcscasecmp () |
| 67 |
and |
| 68 |
.BR wcsncasecmp () |
| 69 |
functions return |
| 70 |
an integer less than, equal to, or greater than zero if |
| 71 |
.I s1 |
| 72 |
is, after ignoring case, found to be |
| 73 |
less than, to match, or be greater than |
| 74 |
.IR s2 , |
| 75 |
respectively. |
| 76 |
.SH ATTRIBUTES |
| 77 |
For an explanation of the terms used in this section, see |
| 78 |
.BR attributes (7). |
| 79 |
.TS |
| 80 |
allbox; |
| 81 |
lbx lb lb |
| 82 |
l l l. |
| 83 |
Interface Attribute Value |
| 84 |
T{ |
| 85 |
.na |
| 86 |
.nh |
| 87 |
.BR wcscasecmp (), |
| 88 |
.BR wcsncasecmp () |
| 89 |
T} Thread safety MT-Safe locale |
| 90 |
.TE |
| 91 |
.SH STANDARDS |
| 92 |
POSIX.1-2008. |
| 93 |
.SH HISTORY |
| 94 |
glibc 2.1. |
| 95 |
.SH NOTES |
| 96 |
The behavior of |
| 97 |
.BR wcscasecmp () |
| 98 |
depends on the |
| 99 |
.B LC_CTYPE |
| 100 |
category of the |
| 101 |
current locale. |
| 102 |
.SH SEE ALSO |
| 103 |
.BR strcasecmp (3), |
| 104 |
.BR wcscmp (3) |