wcsncasecmp3
Compare two wide-character strings, ignoring case
Part of wcscasecmp(3).
Usage
#include <wchar.h>
int wcscasecmp(const wchar_t *s1, const wchar_t *s2); int wcsncasecmp(const wchar_t s1[], const wchar_t s2[], size_t n);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
wcscasecmp(), wcsncasecmp():
Since glibc 2.10:
_POSIX_C_SOURCE >= 200809L
Before glibc 2.10:
_GNU_SOURCE
Library
Standard C library (libc, -lc)
Overview
The wcscasecmp() function is the wide-character equivalent of the strcasecmp(3) function. It compares the wide-character string pointed to by s1 and the wide-character string pointed to by s2, ignoring case differences (towupper(3), towlower(3)).
The wcsncasecmp() function is similar (the wide-character equivalent of strncasecmp(3)), except that it compares no more than n wide characters of s1 and s2.
Return value
The wcscasecmp() and wcsncasecmp() functions return an integer less than, equal to, or greater than zero if s1 is, after ignoring case, found to be less than, to match, or be greater than s2, respectively.
Attributes
For an explanation of the terms used in this section, see attributes(7).
| Interface | Attribute | Value |
| wcscasecmp(), wcsncasecmp() | Thread safety | MT-Safe locale |
Notes
The behavior of wcscasecmp() depends on the LC_CTYPE category of the current locale.
Releases
14 releases since Debian 2.2 (Potato); the text changed 13 times.