wmemset - C wchar.h

C examples for wchar.h:wmemset

Type

function

From


<cwchar>
<wchar.h>

Description

Fill array of wide characters

Prototype

wchar_t* wmemset (wchar_t* ptr, wchar_t wc, size_t num);

Parameters

Parameter Description
ptr Pointer to the array to fill.
wc Value to be set.
num Number of bytes to be set to the value.

Return Value

ptr is returned.

Demo Code


#include <wchar.h>

int main ()/*from   www  . jav  a 2 s .  c  o m*/
{
  wchar_t wcs[] = L"this is a test test test test test test!";
  wmemset (wcs,L'-',6);
  wprintf (L"%ls\n",wcs);
  return 0;
}

Related Tutorials