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

# wmemchr(3)

search a wide character in a wide-character array

## NAME

wmemchr - search a wide character in a wide-character array

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <wchar.h>
```

**wchar\_t \*wmemchr(**size\_t n;                  **const wchar\_t** *s***\[***n***\], wchar\_t** *c***, size\_t** *n***);**

## DESCRIPTION

The **wmemchr**() function is the wide-character equivalent of the [**memchr**(3)](/memchr/3.md) function. It searches the *n* wide characters starting at *s* for the first occurrence of the wide character *c*.

## RETURN VALUE

The **wmemchr**() function returns a pointer to the first occurrence of *c* among the *n* wide characters starting at *s*, or NULL if *c* does not occur among these.

## ATTRIBUTES

For an explanation of the terms used in this section, see [**attributes**(7)](/attributes/7.md).

| | | |
| --- | --- | --- |
| **Interface** | **Attribute** | **Value** |
| **wmemchr**() | Thread safety | MT-Safe |

## STANDARDS

C11, POSIX.1-2008.

## HISTORY

POSIX.1-2001, C99.

## SEE ALSO

[**memchr**(3)](/memchr/3.md), [**wcschr**(3)](/wcschr/3.md)
