wcscpy(3)
π wcscpy(3) β Library Functions Manual π
okay bestie, welcome to the wide-character copy page, you're gonna slay this π
β¨ NAME β¨
wcscpy β copy a wide-character string π¦
π LIBRARY π
Standard C library (libc, -lc)
πΈ SYNOPSIS πΈ
#include <wchar.h>
wchar_t *wcscpy(wchar_t *restrict dest, const wchar_t *restrict src);
π DESCRIPTION π
so basically, wcscpy() is the wide-character version of strcpy(3) β like, it's the same vibe but for wide characters instead of lil regular ones. it takes the wide-character string that src points at and copies the whole thing, including the terminating null wide character (L'\0'), over into the array that dest points at. the null terminator is coming along for the ride, no exceptions, she's part of the group π
the strings may not overlap. like. at all. not even a little. don't do it π
and listen, the programmer (that's you, bestie) must make sure there's room for at least wcslen(src)+1 wide characters sitting at dest. that +1 is the null character's seat, don't forget her π
fr fr, nobody's gonna check that for you. if dest is too small, that's on you and it's giving undefined behaviour π
π«Ά RETURN VALUE π«Ά
wcscpy() returns dest. that's it. that's the whole return value. she just hands you back what you gave her β¨
π₯ ATTRIBUTES π₯
for an explanation of the terms used in this section, see attributes(7) β iykyk.
- Interface:
wcscpy()- Attribute: Thread safety
- Value:
MT-Safe
so yeah, MT-Safe, she's chill in threads, no cap π
β STANDARDS β
C11, POSIX.1-2008. periodt.
π HISTORY π
POSIX.1-2001, C99.
π SEE ALSO π
strcpy(3), wcpcpy(3), wcscat(3), wcsdup(3), wmemcpy(3)
okay that's the whole page, go forth and copy some wide strings responsibly π
little sign-off from your girl: this one lives in Linux man-pages 6.20, dated 2026-02-08, and yes it's still wcscpy(3) β bye bestie, drink water π§π
π¦ 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