stpcpy
raw OCR
Copies one string into another.
Defined in header <string.h>
Syntax
#include <string.h>
char *'stpcpyCchar *dest,const char *src);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ | ■ | ■ |
Remarks
stpcpy copies the string src to dest, stopping after the terminating null character of src has been reached.
Return value
stpcpy returns dest + strlen(src).
See also
Example
#include <stdio.h>
#include <string.h>
int main (void)
{
char string [10];
char *strl = "abcdefghi";
stpcpy (string, strl);
printf ("%s\n", string);
return 0;
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Stable link: /3.1/string.h/stpcpy/
· short form /3.1/stpcpy/