strset() Set All Characters in String
#include <string.h> Required for declarations only
char *strset(string,c);
char *string; String to be set
int c; Character to set to
strset() sets all the characters in 'string' (except the terminating
null character) to 'c'.
Returns: A pointer to the altered string. There is no error
return.
Notes: Use strnset() to set a specified number of characters in
a string.
-------------------------------- Example ---------------------------------
The following statement sets all the characters in 'string' to 'X'.
#include <string.h>
char string[128];
main()
{
strset(string,'X');
}
Seealso:
This page last updated on Fri Nov 30 10:48:32 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster