1) Appends a copy of the wide string pointed to by src to the end of the wide string pointed to by dest. The wide character src[0] replaces the null terminator at the end of dest. The resulting wide string is null-terminated. The behavior is undefined if the destination array is not large enough for the contents of both str and dest and the terminating null wide character. The behavior is undefined if the strings overlap.

2) Same as (1), except that it may clobber the rest of the destination array (from the last character written to destsz) with unspecified values and that the following errors are detected at runtime and call the currently installed constraint handler function:

src or dest is a null pointer

destsz is zero or greater than RSIZE_MAX/sizeof(wchar_t)

there is no null terminator in the first destsz wide characters of dest

truncation would occur (the available space at the end of dest would not fit every wide character, including the null terminator, of src)

overlap would occur between the source and the destination strings

As with all bounds-checked functions, wcscat_s is only guaranteed to be available if __STDC_LIB_EXT1__ is defined by the implementation and if the user defines __STDC_WANT_LIB_EXT1__ to the integer constant 1 before including wchar.h.