- Function
Copy a string.
- Header
- Declaration
char* __fastcall__ strcpy (char* s1, const char* s2);
- Description
The
strcpy
function copies the string pointed to bys2
(including the terminating null byte) into the array pointed to bys1
. The function will always returns1
.- Limits
- The function is only available as fastcall function, so it may only be used in presence of a prototype.
- If copying takes place between objects that overlap, the behaviour is undefined.
- Availability
ISO 9899
- See also
- Example
#include <string.h> static char hello[14]; strcpy (hello, "Hello world!\n");