C examples for wchar.h:wcsncat
function
<cwchar> <wchar.h>
Append characters from wide string
wchar_t* wcsncat (wchar_t* destination, const wchar_t* source, size_t num);
Parameter | Description |
---|---|
destination | Pointer to the destination array |
source | C wide string to be appended. |
num | Maximum number of characters to append. |
destination is returned.
#include <wchar.h> int main ()//ww w. j a v a2 s .com { wchar_t wcs1[20]; wchar_t wcs2[20]; wcscpy ( wcs1, L"To be test" ); wcscpy ( wcs2, L"or not to be test" ); wcsncat ( wcs1, wcs2, 6 ); wprintf ( L"%ls\n", wcs1); return 0; }