INtime SDK Help
strdup, _wcsdup

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);

Parameters

string
Source string; must contain a null character marking the end of the string.

Remarks

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.

Return Values

A pointer to the storage space containing the copied string.
Success.
A null pointer if storage cannot be allocated.
Failure.

Generic Text Routines

tchar.h routine _UNICODE not defined _UNICODE defined
_tcsdup strdup _wcsdup

Requirements

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
See Also