wmemset(3)

πŸ’– wmemset(3) β€” Library Functions Manual πŸ’–

okay bestie, gather round, because today we're talking about wmemset, the wide-character glow-up of everyone's fave array-filler. yes, she lives in the Library Functions Manual, section 3, and she is so much cooler than she sounds. let's get into it. πŸ¦‹


✨ NAME ✨

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

like. she fills. she sets. she's a memset but ✨wide✨. it's giving "same energy, bigger vibes." πŸ’…


πŸ“š LIBRARY πŸ“š

Standard C library (libc, -lc)

she's not some niche third-party thing you gotta go hunt down on github at 2am, she's right there in libc, bestie. built in. iconic. πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

#include <wchar.h>

wchar_t *wmemset(size_t n;
                 wchar_t wcs[n], wchar_t wc, size_t n);

yes, n shows up in two places, that's not a typo, that's just how she rolls. don't come for her. 😭


🌸 DESCRIPTION 🌸

okay so the tea: wmemset() is literally the wide-character equivalent of memset(3). that's it. that's her whole thing.

she fills the array of n wide-characters starting at wcs with n copies of the wide character wc.

so you hand her a spot in memory, you tell her how many wide-chars deep to go, you give her the wide-char you want stamped in there, and she just... does it. every single one. no questions asked. no cap. πŸ”₯


πŸ’« RETURN VALUE πŸ’«

wmemset() returns wcs.

that's it. she hands you back the exact pointer you gave her, like "here bestie, you dropped this, now go do something slay with it." 🫢


🧚 ATTRIBUTES 🧚

the vibe check on this section (and for what all these terms even mean, go peek at attributes(7)):

  • Interface: wmemset()
  • Attribute: Thread safety
  • Value: MT-Safe

translation?? she's MT-Safe, babes. multiple threads can hang out with her at the same time and nothing is gonna go sideways. we love a low-drama, unproblematic queen. no fighting, no drama, no chaos. πŸ’œ (lowkey wish the group chat could say the same but okay.)


⭐ STANDARDS ⭐

  • C11
  • POSIX.1-2008

she's certified. legit. proper. official. standards-approved behavior, periodt. 🌈


πŸ•°οΈ HISTORY πŸ•°οΈ

  • POSIX.1-2001
  • C99

she's been around since before most of us could even hold a phone. an OG. a legend. a legacy. πŸ™ˆ


πŸ‘€ SEE ALSO πŸ‘€

that's her sister. the non-wide one. the original. the blueprint. go show her some love too. πŸ’–



and that's the whole page, bestie!! this came to you from Linux man-pages 6.20, dated 2026-02-08, and honestly? we ate. no crumbs. slay the day away and go fill some wide-character arrays. πŸ‘‘πŸ’…βœ¨πŸ“

πŸ“¦ where this page comes from
  • arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • πŸ“œ the page's license: GPL-2.0-or-later
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms