home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / alde_c / misc / lib / dlibssrc / strcat.c < prev    next >
Encoding:
Text File  |  1987-06-14  |  423 b   |  19 lines

  1. char *strcat(dest, source)
  2. register char *dest;
  3. register char *source;
  4. /*
  5.  *    Concatenate <source> on the end of <dest>.  The terminator of
  6.  *    <dest> will be overwritten by the first character of <source>.
  7.  *    The termintor from <source> will be copied.  A pointer to
  8.  *    the modified <dest> is returned.
  9.  */
  10. {
  11.     register char *p = dest;
  12.  
  13.     while(*dest)
  14.         ++dest;
  15.     while(*dest++ = *source++)
  16.         ;
  17.     return(p);
  18. }
  19.