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