1WCSDUP(3) Linux Programmer's Manual WCSDUP(3)
2
3
4
6 wcsdup - duplicate a wide-character string
7
9 #include <wchar.h>
10
11 wchar_t *wcsdup(const wchar_t *s);
12
13 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
14
15 wcsdup():
16 Since glibc 2.10:
17 _XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L
18 Before glibc 2.10:
19 _GNU_SOURCE
20
22 The wcsdup() function is the wide-character equivalent of the strdup(3)
23 function. It allocates and returns a new wide-character string whose
24 initial contents is a duplicate of the wide-character string pointed to
25 by s.
26
27 Memory for the new wide-character string is obtained with malloc(3),
28 and should be freed with free(3).
29
31 On success, wcsdup() returns a pointer to the new wide-character
32 string. On error, it returns -1, with errno set to indicate the cause
33 of the error.
34
36 ENOMEM Insufficient memory available to allocate duplicate string.
37
39 POSIX.1-2008. This function is not specified in POSIX.1-2001, and is
40 not widely available on other systems.
41
43 strdup(3), wcscpy(3)
44
46 This page is part of release 3.53 of the Linux man-pages project. A
47 description of the project, and information about reporting bugs, can
48 be found at http://www.kernel.org/doc/man-pages/.
49
50
51
52GNU 2013-04-19 WCSDUP(3)