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