home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / c / string.arc / STRMOV.C < prev    next >
C/C++ Source or Header  |  1984-12-31  |  768b  |  22 lines

  1. /*  File   : strmov.c
  2.     Author : Richard A. O'Keefe.
  3.     Updated: 20 April 1984
  4.     Defines: strmov()
  5.  
  6.     strmov(dst, src) moves all the  characters  of  src  (including  the
  7.     closing NUL) to dst, and returns a pointer to the new closing NUL in
  8.     dst.   The similar UNIX routine strcpy returns the old value of dst,
  9.     which I have never found useful.  strmov(strmov(dst,a),b) moves a//b
  10.     into dst, which seems useful.
  11. */
  12.  
  13. #include "strings.h"
  14.  
  15. char *strmov(dst, src)
  16.     register char *dst, *src;
  17.     {
  18.     while (*dst++ = *src++) ;
  19.     return dst-1;
  20.     }
  21.