STRCPY - copy one string to another.
(ANSI Standard)
Usage:
#include <string.h>
ptr = strcpy( s1, s2 );
Where:
- char *s1;
- points to an area of memory that is to receive the copied
characters.
- const char *s2;
- points to the string from which characters will be
copied. This must end with the usual '\0'.
- char *ptr;
- points to the copied string (i.e. "s1").
Description:
"strcpy" copies the string "s2" into the
area pointed to by "s1". This area must be big enough
to hold the contents of "s2". Since "strcpy"
moves the '\0' at the end of "s2", the new string
"s1" will have the usual terminating '\0'.
See Also:
expl c lib strncpy
expl c lib memcpy
Copyright © 1996, Thinkage Ltd.