[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
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');
}
See Also:
strnset()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson