C examples for wchar.h:wcsxfrm
function
<cwchar> <wchar.h>
Transform wide string using locale
size_t wcsxfrm (wchar_t* destination, const wchar_t* source, size_t num);
Parameter | Description |
---|---|
destination | Pointer to the destination array |
source | C wide string |
num | Maximum number of characters |
The length of the transformed wide string, not including the terminating null wide character.
#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; }