Fills a string with a specified character, for a specified length.
#include <string.h> char *strnset ( char *s1, int fill, size_t len);
(OUT) Points to the string to fill.
(IN) Specifies the character to copy.
(IN) Specifies the number of bytes into which the fill character is to be copied.
Returns a pointer to s1.
The strnset function fills the string s1 with the value of the argument fill, converted to be a character value. 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.