Fix: 64-bit compatibility
[AROS.git] / compiler / stdc / stpcpy.c
blobb6643beaf9514f97a1abd25ceacb072ad3cf6ee7
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 /*****************************************************************************
8 NAME */
9 #include <string.h>
11 char * stpcpy (
13 /* SYNOPSIS */
14 char * dest,
15 const char * src)
17 /* FUNCTION
18 Copy a string returning pointer to its end.
20 INPUTS
21 dest - The string is copied into this variable. Make sure it is
22 large enough.
24 src - This is the new contents of dest.
26 RESULT
27 pointer to the end of the string dest (address of it's null
28 character)
30 NOTES
31 No check is made that dest is large enough for src.
33 EXAMPLE
35 BUGS
37 SEE ALSO
38 strcpy()
40 INTERNALS
42 ******************************************************************************/
44 char * ptr = dest;
46 while ((*ptr = *src))
48 ptr ++;
49 src ++;
52 return ptr;
54 } /* stpcpy */