wmemset


wmemset

Sets all wide characters in a memory block to a given value

 #include <wchar.h> wchar_t *wmemset ( wchar_t *buffer , wchar_t c , size_t n  ); 

The memset( ) 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 ); /* ... */ 

See Also

memset( ), calloc( )



C(c) In a Nutshell
C in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596006977
EAN: 2147483647
Year: 2006
Pages: 473

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net