Next: wcsncasecmp
—case-insensitive wide character string compare, Previous: wcscasecmp
—case-insensitive wide character string compare, Up: Strings and Memory (string.h) [Contents][Index]
wcsdup
—wide character string duplicateSynopsis
#include <wchar.h> wchar_t *wcsdup(const wchar_t *str); #include <wchar.h> wchar_t *_wcsdup_r(struct _reent *ptr, const wchar_t *str);
Description
wcsdup
allocates a new wide character string using malloc
,
and copies the content of the argument str into the newly
allocated string, thus making a copy of str.
Returns
wcsdup
returns a pointer to the copy of str if enough
memory for the copy was available. Otherwise it returns NULL
and errno is set to ENOMEM.
Portability
POSIX-1.2008