wcscat(3)
β¨ wcscat β concatenate two wide-character strings β¨
okay bestie, gather round, because we're about to glue two wide-character strings together and it's giving arts and crafts π
This one lives in section 3 of the manual β like, Library Functions Manual energy β and it's wcscat, the wide-character string appender. π
π LIBRARY
Standard C library β link it with libc, so toss -lc on your compile line and you're golden. π«Ά
β¨ SYNOPSIS
#include <wchar.h>
wchar_t *wcscat(wchar_t *restrict dest, const wchar_t *restrict src);
πΈ DESCRIPTION
So here's the tea, bestie: wcscat() is literally the wide-character glow-up of strcat(3). Same vibe, bigger characters. π
What it does: it takes the wide-character string that src is pointing at β and yes, including that terminating null wide character (L'\0') β and copies the whole thing onto the end of the wide-character string that dest is pointing at. Snip snip, paste paste, done. π
BIG one: the strings may not overlap. Do not try it. It's not a vibe. π«
And the responsibility check: the programmer (that's you, gorgeous) must make sure there's room for at least wcslen(dest)+wcslen(src)+1 wide characters sitting at dest. That +1? That's the null terminator's seat. Reserve it or regret it. π
π RETURN VALUE
wcscat() hands you back dest. That's it, that's the return value. Iconic, predictable, we love a function that returns exactly what you gave it. β¨
π¦ ATTRIBUTES
Quick note: for a whole explanation of what these words even mean, go peek at attributes(7). π
wcscat()β Thread safety: MT-Safe π
(That's the whole table, bestie β one row. Lowkey the easiest table I've ever read.)
β STANDARDS
C11, POSIX.1-2008. Certified, standardized, no cap. π
π§ HISTORY
It's been around β POSIX.1-2001, C99. A true elder of the character-string world. π
π SEE ALSO
Go bother the cousins, they've got lore too:
mwah π β this page came straight out of Linux man-pages 6.20, dated 2026-02-08. Stay safe out there, terminate your strings, and never overlap them. byeee π¦β¨
π¦ 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