wmemcpy(3)

✨ wmemcpy(3) ✨

okay bestie, gather round, because today we're talking about wmemcpy from the Library Functions Manual, and honestly? she's the wide-character glow-up of a function you already know and love πŸ’–

🌸 NAME 🌸

wmemcpy β€” copy an array of wide-characters

πŸŽ€ LIBRARY πŸŽ€

Standard C library (libc, -lc) 🫢

✨ SYNOPSIS ✨

#include <wchar.h>

wchar_t *wmemcpy(size_t n;
                 wchar_t dest[restrict n],
                 const wchar_t src[restrict n],
                 size_t n);

πŸ’… DESCRIPTION πŸ’…

so the way that wmemcpy() works is that she IS the wide-character equivalent of the memcpy(3) function. iconic lineage, no cap πŸ‘‘

She copies n wide characters from the array starting at src to the array starting at dest. That's it, that's the whole job, and she does it flawlessly ✨

⚠️ okay but listen β€” the arrays may not overlap. like, at all. if you need to copy between overlapping arrays, use wmemmove(3) instead, bestie, she's built for that πŸ’œ

Also: the programmer must ensure that there is room for at least n wide characters at dest. That's on you, not on her. She will not check. She will not warn. She's just gonna do it πŸ™ˆ

πŸ¦‹ RETURN VALUE πŸ¦‹

wmemcpy() returns dest. That's the whole vibe β€” she hands you back the destination like "here you go queen, it's yours 🫢"

πŸ‘‘ ATTRIBUTES πŸ‘‘

For an explanation of the terms used in this section, see attributes(7).

  • wmemcpy() β€” Thread safety: MT-Safe πŸ”₯

(translation: she's thread-safe, she's not out here causing chaos, periodt.)

⭐ STANDARDS ⭐

C11, POSIX.1-2008. Certified, official, documented πŸ’…

🌈 HISTORY 🌈

POSIX.1-2001, C99. She's been around, she's got lore, she's a legacy icon πŸŽ€

πŸ’€ SEE ALSO πŸ’€


and that's the whole page, bestie!! 🌸 this was brought to you by Linux man-pages 6.20, dated 2026-02-08, and she ate, she left no crumbs, fr fr πŸ’–βœ¨πŸ§š

πŸ“¦ 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