Name
wmemset
Synopsis
Sets all wide characters in a memory block to a given value
#include <wchar.h> wchar_t *wmemset
( wchar_t *buffer
, wchar_tc
, size_tn
);
The wmemset()
function sets
each wide character in a block of n
wide
characters to the value c
, beginning at
the address in dest
. The return value is
the same as the pointer argument
dest
.
Example
#define BLOCKSIZE 2048 // Size as a number of wchar_t elements.
wchar_t *inputblock;
if (( inputblock = malloc( BLOCKSIZE * sizeof(wchar_t))) != NULL )wmemset
( inputblock, L'~', BLOCKSIZE );
/* ... */
Get C in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.