Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C - <b>strset() set all characters in string</b> http://www.X-Hacker.org [<<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()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson