OpenBSD manual page server

Manual Page Search Parameters

WCSCAT(3) Library Functions Manual WCSCAT(3)

wcscat, wcsncatconcatenate wide strings

#include <wchar.h>

wchar_t *
wcscat(wchar_t * restrict s, const wchar_t * restrict append);

wchar_t *
wcsncat(wchar_t * restrict s, const wchar_t * restrict append, size_t count);

The () and wcsncat() functions append a copy of the wide string append to the end of the wide string s, then add a terminating null wide character (L'\0'). The wide string s must have sufficient space to hold the result.

The () function appends not more than count wide characters where space for the terminating null wide character should not be included in count.

The wcscat() and wcsncat() functions return the pointer s.

strcat(3), strlcpy(3), wcscpy(3), wcslcpy(3), wmemcpy(3), wmemmove(3)

The wcscat() and wcsncat() functions conform to ISO/IEC 9899:1999 (“ISO C99”) and were first introduced in ISO/IEC 9899/AMD1:1995 (“ISO C90, Amendment 1”).

The wcscat() and wcsncat() functions were ported from NetBSD and first appeared in OpenBSD 3.8.

Using the functions wcscat() and wcsncat() is very error-prone with respect to buffer overflows; see the EXAMPLES section in strcat(3) for correct usage. Using wcslcat(3) is a better choice in most cases.

June 5, 2013 OpenBSD-6.9