wcsncat - C wchar.h

C examples for wchar.h:wcsncat

Type

function

From


<cwchar>
<wchar.h>

Description

Append characters from wide string

Prototype

wchar_t* wcsncat (wchar_t* destination, const wchar_t* source, size_t num);

Parameters

Parameter Description
destination Pointer to the destination array
source C wide string to be appended.
num Maximum number of characters to append.

Return Value

destination is returned.

Demo Code


#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;
}

Related Tutorials