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