1WCSDUP(3) Linux Programmer's Manual WCSDUP(3)
2
3
4
6 wcsdup - duplicate a wide-character string
7
9 #define _GNU_SOURCE
10 #include <wchar.h>
11
12 wchar_t *wcsdup(const wchar_t *s);
13
15 The wcsdup() function is the wide-character equivalent of the strdup()
16 function. It allocates and returns a new wide-character string whose
17 initial contents is a duplicate of the wide-character string pointed to
18 by s.
19
20 Memory for the new wide-character string is obtained with malloc(3),
21 and can be freed with free(3).
22
24 The wcsdup() function returns a pointer to the new wide-character
25 string, or NULL if sufficient memory was not available.
26
28 ENOMEM Insufficient memory available to allocate duplicate string.
29
31 This function is a GNU extension.
32
34 strdup(3), wcscpy(3), feature_test_macros(7)
35
36
37
38GNU 2003-11-01 WCSDUP(3)