1WCSDUP(3)                  Linux Programmer's Manual                 WCSDUP(3)
2
3
4

NAME

6       wcsdup - duplicate a wide-character string
7

SYNOPSIS

9       #define _GNU_SOURCE
10       #include <wchar.h>
11
12       wchar_t *wcsdup(const wchar_t *s);
13

DESCRIPTION

15       The wcsdup() function is the wide-character equivalent of the strdup(3)
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 should be freed with free(3).
22

RETURN VALUE

24       The  wcsdup()  function  returns  a  pointer  to the new wide-character
25       string, or NULL if sufficient memory was not available.
26

ERRORS

28       ENOMEM Insufficient memory available to allocate duplicate string.
29

CONFORMING TO

31       POSIX.1-2008.  This function is not specified in POSIX.1-2001,  and  is
32       not widely available on other systems.
33

SEE ALSO

35       strdup(3), wcscpy(3), feature_test_macros(7)
36

COLOPHON

38       This  page  is  part of release 3.25 of the Linux man-pages project.  A
39       description of the project, and information about reporting  bugs,  can
40       be found at http://www.kernel.org/doc/man-pages/.
41
42
43
44GNU                               2009-02-04                         WCSDUP(3)
Impressum