wcsxfrm - C wchar.h

C examples for wchar.h:wcsxfrm

Type

function

From


<cwchar>
<wchar.h>

Description

Transform wide string using locale

Prototype

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

Parameters

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

Return Value

The length of the transformed wide string, not including the terminating null wide character.

Demo Code

#include <wchar.h>
#include <stdio.h>

int main()/*  w  ww  . jav  a2s . co m*/
{

  wchar_t wcs[] = L"this is a test \n \t \a";

   wchar_t dest[80] = L"";

  size_t s = wcsxfrm(dest, wcs, 20);

  wprintf(L"%s\n", dest);

  return 0;
}

Related Tutorials