wcsdup()

duplicate wide character string 

Function


SYNOPSIS

#include <wchar.h>

wchar_t *wcsdup(const wchar_t *ws1);


DESCRIPTION

The wcsdup() function allocates memory and copies into it the wide character string addressed by ws1, including the terminating null character. It is the user's responsibility to free the allocated storage by calling free().


PARAMETERS

ws1 

Is a null-terminated string to duplicate.


RETURN VALUES

On success, wcsdup() returns a pointer to a newly allocated copy of the wide character string ws1. On failure, wcsdup() returns a null pointer and sets errno as follows:

ENOMEM 

Insufficient memory is available to copy the string s1.


CONFORMANCE

ANSI/ISO 9899-1990/AM 1-1995.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
calloc(), free(), malloc(), wcscpy()


PTC MKS Toolkit 10.5 Documentation Build 40.