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

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: strcpy.c,v 1.6 1996/12/11 11:22:36 aros Exp $
  4.  
  5.     Desc: ANSI C function strcpy()
  6.     Lang: english
  7. */
  8.  
  9. /*****************************************************************************
  10.  
  11.     NAME */
  12. #include <string.h>
  13.  
  14.     char * strcpy (
  15.  
  16. /*  SYNOPSIS */
  17.     char       * dest,
  18.     const char * src)
  19.  
  20. /*  FUNCTION
  21.     Copy a string. Works like an assignment "dest=src;".
  22.  
  23.     INPUTS
  24.     dest - The string is copied into this variable. Make sure it is
  25.         large enough.
  26.     src - This is the new contents of dest.
  27.  
  28.     RESULT
  29.     dest.
  30.  
  31.     NOTES
  32.     No check is beeing made that dest is large enough for src.
  33.  
  34.     EXAMPLE
  35.  
  36.     BUGS
  37.  
  38.     SEE ALSO
  39.     strncpy(), memcpy(), memmove()
  40.  
  41.     INTERNALS
  42.  
  43.     HISTORY
  44.     29.07.1996 digulla created
  45.  
  46. ******************************************************************************/
  47. {
  48.     char * ptr = dest;
  49.  
  50.     while ((*ptr = *src))
  51.     {
  52.     ptr ++;
  53.     src ++;
  54.     }
  55.  
  56.     return dest;
  57. } /* strcpy */
  58.