Duplicates null-terminated strings.
#include <string.h>
char *strdup(const char *string);
char *_strdup(const char *string);
#include <wchar.h>
wchar_t *_wcsdup(const wchar_t *string);
string
The function allocates storage space from the heap for a copy of string, using malloc. _strdup is an alternate name for strdup. _wcsdup is the wide-character version of strdup.
tchar.h routine |
_UNICODE not defined |
_UNICODE defined |
---|---|---|
_tcsdup | strdup | _wcsdup |
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 INtime 6.0 (for wide-character and generic text versions) |
intime/rt/include/string.h intime/rt/include/wchar.h intime/rt/include/tchar.h |
string.h wchar.h tchar.h |
clib.lib |