---
name: "wcscasecmp"
section: "3"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/wcscasecmp"
---

# wcscasecmp(3)

compare two wide-character strings, ignoring case

## 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(const wchar\_t** *s1***\[\], const wchar\_t** *s2***\[\], size\_t** *n***);**

Feature Test Macro Requirements for glibc (see [**feature\_test\_macros**(7)](/feature_test_macros/7.md)):

**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)](/strcasecmp/3.md) 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)](/towupper/3.md), [**towlower**(3)](/towlower/3.md)).

The **wcsncasecmp**() function is similar (the wide-character equivalent of [**strncasecmp**(3)](/strncasecmp/3.md)), 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)](/attributes/7.md).

| | | |
| --- | --- | --- |
| **Interface** | **Attribute** | **Value** |
| **wcscasecmp**(), **wcsncasecmp**() | Thread safety | MT-Safe locale |

## 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)](/strcasecmp/3.md), [**wcscmp**(3)](/wcscmp/3.md)
