wcsdup

Duplicates a wide-character string.

Library:LibC
Classification:Linux
Service:Characters and Strings

Syntax

  #include <wchar.h> 
   
  wchar_t *wcsdup (
     const wchar_t   *s);
  

Parameters

s

(IN) Points to the wide-character string to duplicate.

Return Values

Returns a pointer to s or NULL if insufficient memory is available.

Remarks

The wcsdup function allocates memory for the string and then copies the specified string to that memory, and returns a pointer to the string. When you have finished with the duplicated string, you should free the memory by calling the free function.

See Also