home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / c / string.arc / STRCPY.C < prev    next >
Text File  |  1984-12-31  |  768b  |  23 lines

  1. /*  File   : strcpy.c
  2.     Author : Richard A. O'Keefe.
  3.     Updated: 20 April 1984
  4.     Defines: strcpy()
  5.  
  6.     strcpy(dst, src) copies all the characters  of  src  (including  the
  7.     closing  NUL)  to dst, and returns the old value of dst.  Maybe this
  8.     is useful for doing i = strlen(strcpy(dst, src)); I've always  found
  9.     strmov handier.
  10. */
  11.  
  12. #include "strings.h"
  13.  
  14. char *strcpy(dst, src)
  15.     register char *dst, *src;
  16.     {
  17.     char *save;
  18.  
  19.     for (save = dst; *dst++ = *src++; ) ;
  20.     return save;
  21.     }
  22.