Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ strset(DOS) — OpenDesktop Software Development System 1.0.0d

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     STRSET(DOS)               UNIX System V               STRSET(DOS)



     Name
          strset - Sets all characters in a string to one character.

     Syntax
          #include <string.h>

          char *strset(string, c)
          char *string;
          int c;

     Description
          The strset function sets all of the characters of string to
          c, except the terminating null character (\0).

     Return Value
          The strset function returns a pointer to the altered string.
          There is no error return.

     See Also
          strnset(DOS)

     Example
          #include <string.h>
          #include <stdio.h>

          char string[100] = "Fill the string with something",
                        *result;

          main()
           {
                  printf("The string before 'strset' is used: \"%s\"\n",
                            string);
                  result = strset(string,' ');
                  printf("The string after 'strset' was used: \"%s\"\n",
                            result);
           }

          This program uses strset to fill the string named string
          with blanks.

                                                (printed 7/6/89)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026