home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / compiler / clib / strcat.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-09  |  988 b   |  61 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: strcat.c,v 1.1 1996/12/11 11:24:46 aros Exp $
  4.  
  5.     Desc: ANSI C function strcat()
  6.     Lang: english
  7. */
  8.  
  9. /*****************************************************************************
  10.  
  11.     NAME */
  12. #include <string.h>
  13.  
  14.     char * strcat (
  15.  
  16. /*  SYNOPSIS */
  17.     char       * dest,
  18.     const char * src)
  19.  
  20. /*  FUNCTION
  21.     Concatenates two strings.
  22.  
  23.     INPUTS
  24.     dest - src is appended to this string. Make sure that there
  25.         is enough room for src.
  26.     src - This string is appended to dest
  27.  
  28.     RESULT
  29.     dest.
  30.  
  31.     NOTES
  32.     The routine makes no checks if dest is large enough.
  33.  
  34.     EXAMPLE
  35.     char buffer[64];
  36.  
  37.     strcpy (buffer, "Hello ");
  38.     strcat (buffer, "World.");
  39.  
  40.     // Buffer now contains "Hello World."
  41.  
  42.     BUGS
  43.  
  44.     SEE ALSO
  45.  
  46.     INTERNALS
  47.  
  48.     HISTORY
  49.  
  50. ******************************************************************************/
  51. {
  52.     char * d = dest;
  53.  
  54.     while (*dest)
  55.     dest ++;
  56.  
  57.     while ((*dest ++ = *src ++));
  58.  
  59.     return d;
  60. } /* strcat */
  61.