Locale-Sensitive C/C++ String Operation Function
char *strdup(const char *strSource);
char *_strdup(const char *strSource);
wchar_t *wcsdup(const wchar_t *strSource);
wchar_t *_wcsdup(const wchar_t *strSource);
unsigned char *_mbsdup(const unsigned char *strSource);
_TXCHAR *_tcsdup(const _TXCHAR *strSource);
Internationalization (I18n) Function Overview
The strdup/_strdup functions create and return a pointer to a duplicate copy of strSource .
wcsdup/_wcsdup are the wide character equivalents; their parameters are wide-character strings.
_mbsdup is supported on Windows platforms only and is the multibyte equivalent; its parameters is a multibyte string and it returns a multibyte string.
_tcsdup is the Windows-only Generic version of the function; with the _MBCS or _UNICODE compiler flags determining its mapping to either _mbsdup or _wcsdup .
Note that the _strdup and _wcsdup functions are Microsoft Windows functions, whereas the strdup and wcsdup functions are ANSI functions.
I18n Issues
Use the appropriate version of the function as required for internationalization support.
Recommended Function Replacements
Locale-Sensitive C/C++
String Operation Functions
|