---
name: "wmemset"
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/wmemset"
---

# wmemset(3)

fill an array of wide-characters with a constant wide character

## NAME

wmemset - fill an array of wide-characters with a constant wide character

## LIBRARY

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

## SYNOPSIS

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

**wchar\_t \*wmemset(**size\_t n;                  **wchar\_t** *wcs***\[***n***\], wchar\_t** *wc***, size\_t** *n***);**

## DESCRIPTION

The **wmemset**() function is the wide-character equivalent of the [**memset**(3)](/memset/3.md) function. It fills the array of *n* wide-characters starting at *wcs* with *n* copies of the wide character *wc*.

## RETURN VALUE

**wmemset**() returns *wcs*.

## ATTRIBUTES

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

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

## STANDARDS

C11, POSIX.1-2008.

## HISTORY

POSIX.1-2001, C99.

## SEE ALSO

[**memset**(3)](/memset/3.md)
