wcsncat(3)
β¨ NAME β¨
wcsncat β bestie, this one concatenates two wide-character strings π
π LIBRARY π
Standard C library (libc, link it with -lc) π«Ά
π SYNOPSIS π
#include <wchar.h>
wchar_t *wcsncat(size_t n;
wchar_t *restrict dest,
const wchar_t src[restrict n],
size_t n);
π DESCRIPTION π
okay so. wcsncat() is literally the wide-character equivalent of strncat(3) β same energy, just wide chars instead of regular ones β¨
What it does: it copies at most n wide characters from the wide-character string pointed to by src onto the end of the wide-character string pointed to by dest, and then it adds a terminating null wide character (L'\0') so the whole thing is properly closed off. periodt. πββοΈ
β οΈ the strings may not overlap. fr fr. not even a little. don't try it.
π and here's the part where you (yes, you, the programmer) have to make sure there's room for at least wcslen(dest)+n+1 wide characters sitting at dest. that's on you bestie, the function is not gonna check for you. no cap.
π RETURN VALUE π
wcsncat() returns dest. that's it, that's the tea π (it hands you back your destination pointer so you can chain stuff, iconic behavior honestly π)
π¦ ATTRIBUTES π¦
For the whole explanation of the terms used in this section, go peek at attributes(7) π
Here's the vibe check for wcsncat():
- Interface:
wcsncat() - Attribute: Thread safety
- Value:
MT-Safeβ
so yeah, it's thread safe, slay π
β STANDARDS β
C11, POSIX.1-2008. π―
πΈ HISTORY πΈ
POSIX.1-2001, C99. it's been around, it's a classic, it ate π
π SEE ALSO π
and that's the whole page bestie!! π this was pulled straight from the Linux man-pages 6.20, dated 2026-02-08 β go forth and concatenate (safely, with room for wcslen(dest)+n+1, i am begging you ππ«Ά) β¨π¦πΈ
π¦ 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