wcsnset

Fills a wide-character string with a specified character, for a specified length.

Library:LibC
Classification:Other
Service:Characters and Strings

Syntax

  #include <wchar.h> 
   
  wchar_t  *wcsnset (
     wchar_t   *ws1,
     wchar_t    fill,
     size_t     len);
  

Parameters

ws1

(OUT) Points to the wide-character string to fill.

fill

(IN) Specifies the character to copy.

len

(IN) Specifies the number of bytes into which the fill character is to be copied.

Return Values

Returns a pointer to ws1.

Remarks

The wcsnset function fills the string ws1 with the value of the argument fill. When the value of len is greater than the length of the string, the entire string is filled. Otherwise, that number of characters at the start of the string is set to the fill character.

See Also

wcsset