home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c065 / 1.ddi / CLIB1.ZIP / STRSET.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-06-07  |  1.5 KB  |  44 lines

  1. /*-----------------------------------------------------------------------*
  2.  * filename - strset.c
  3.  *
  4.  * function(s)
  5.  *        strset - sets all characters in a string to a given
  6.  *                 character
  7.  *-----------------------------------------------------------------------*/
  8.  
  9. /*[]------------------------------------------------------------[]*/
  10. /*|                                                              |*/
  11. /*|     Turbo C Run Time Library - Version 3.0                   |*/
  12. /*|                                                              |*/
  13. /*|                                                              |*/
  14. /*|     Copyright (c) 1987,1988,1990 by Borland International    |*/
  15. /*|     All Rights Reserved.                                     |*/
  16. /*|                                                              |*/
  17. /*[]------------------------------------------------------------[]*/
  18.  
  19. #include <string.h>
  20. #include <mem.h>
  21.  
  22. /*---------------------------------------------------------------------*
  23.  
  24. Name            strset - sets all characters in a string to a given
  25.                          character
  26.  
  27. Usage           char *strset(char *str, int ch);
  28.  
  29. Prototype in    string.h
  30.  
  31. Description     strset sets all characters in the string str to the
  32.                 character ch.
  33.  
  34. Return value    pointer to str
  35.  
  36. *---------------------------------------------------------------------*/
  37. #undef strset            /* not an intrinsic */
  38. char *strset(char *s, int ch)
  39. {
  40.         setmem(s, strlen(s), ch);
  41.         return (s);
  42. }
  43.  
  44.