function
<cwchar>

wcscat

wchar_t* wcscat (wchar_t* destination, const wchar_t* source);
Concatenate wide strings
Appends a copy of the source wide string to the destination wide string. The terminating null wide character in destination is overwritten by the first character of source, and a null wide character is included at the end of the new string formed by the concatenation of both in destination.

destination and source shall not overlap.

This is the wide character equivalent of strcat (<cstring>).

Parameters

destination
Pointer to the destination array, which should contain a C wide string, and be large enough to contain the concatenated resulting string.
source
C wide string to be appended. This should not overlap destination.

Return Value

destination is returned.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
/* wcscat example */
#include <wchar.h>

int main ()
{
  wchar_t wcs[80];
  wcscpy (wcs,L"these ");
  wcscat (wcs,L"wide strings ");
  wcscat (wcs,L"are ");
  wcscat (wcs,L"concatenated.");
  wprintf (L"%ls\n",wcs);
  return 0;
}


Output:

these wide strings are concatenated. 

See also