Header File
string.h
Category
Memory and String Manipulation Routines
Prototype
char *stpcpy(char *dest, const char *src);
wchar * _wcspcpy(wchar *dest, const wchar *src);
Description
Copies one string into another.
_stpcpy copies the string src to dest, stopping after the terminating null character of src has been reached.
Return Value
stpcpy returns a pointer to the terminating null character of dest.
If UNICODE is defined, _wcspcpy returns a pointer to the terminating null character of the wchar_t dest string.
Example
#include <stdio.h> #include <string.h> int main(void) { char string[10]; char *str1 = "abcdefghi"; stpcpy(string, str1); printf("%s\n", string); return 0; }
Portability
|
POSIX |
Win32 |
ANSI C |
ANSI C++ |
_stpcpy |
|
+ |
|
|
_wcspcpy |
|
+ |
|
|
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|