Manpage logo

wcsncasecmp - compare two wide-character strings, ignoring case

NAME  LIBRARY  SYNOPSIS  DESCRIPTION  RETURN VALUE  ATTRIBUTES  STANDARDS  HISTORY  NOTES  SEE ALSO 

NAME

wcscasecmp, wcsncasecmp − compare two wide-character strings, ignoring case

LIBRARY

Standard C library (libc−lc)

SYNOPSIS

#include <wchar.h>

int wcscasecmp(const wchar_t *s1, const wchar_t *s2);
int wcsncasecmp(
size_t n;
const wchar_t
s1[n], const wchar_t s2[n], 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

DESCRIPTION

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).

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.1.

NOTES

The behavior of wcscasecmp() depends on the LC_CTYPE category of the current locale.

SEE ALSO

strcasecmp(3), wcscmp(3)


Updated 2026-06-01 - jenkler.se | uex.se