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

NAME

6       wcpncpy  -  copy  a  fixed-size  string of wide characters, returning a
7       pointer to its end
8

SYNOPSIS

10       #define _GNU_SOURCE
11       #include <wchar.h>
12
13       wchar_t *wcpncpy(wchar_t *dest, const wchar_t *src, size_t n);
14

DESCRIPTION

16       The wcpncpy() function is the wide-character  equivalent  of  the  stp‐
17       ncpy(3)  function.   It copies at most n wide characters from the wide-
18       character string pointed to by src,  including  the  terminating  L'\0'
19       character,  to the array pointed to by dest.  Exactly n wide characters
20       are written at dest.  If the length wcslen(src) is smaller than n,  the
21       remaining  wide  characters  in the array pointed to by dest are filled
22       with L'\0' characters.  If the length wcslen(src) is greater  or  equal
23       to n, the string pointed to by dest will not be L'\0' terminated.
24
25       The strings may not overlap.
26
27       The programmer must ensure that there is room for at least n wide char‐
28       acters at dest.
29

RETURN VALUE

31       wcpncpy() returns a pointer to the last wide  character  written,  that
32       is, dest + n - 1.
33

CONFORMING TO

35       This function is a GNU extension.
36

SEE ALSO

38       stpncpy(3), wcsncpy(3), feature_test_macros(7)
39

COLOPHON

41       This  page  is  part of release 3.25 of the Linux man-pages project.  A
42       description of the project, and information about reporting  bugs,  can
43       be found at http://www.kernel.org/doc/man-pages/.
44
45
46
47GNU                               2003-11-01                        WCPNCPY(3)
Impressum