wcsdup

Name

wcsdup -- duplicate a wide-character string

Synopsis

#include <wchar.h>

wchar_t * wcsdup(const wchar_t * s);

Description

The wcsdup() function is the wide-character equivalent of strdup(). The wcsdup() function shall return a pointer to a new wide character string, which is a duplicate of the wide character string pointed to by s. The returned pointer can be passed to free(). A null pointer is returned if the new string cannot be created.

Return Value

The wcsdup() function returns a pointer to a new wide-character string on success. Otherwise, it shall return NULL and set errno to indicate the error.

Errors

ENOMEM 

Insufficient memory available.