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       #include <wchar.h>
11
12       wchar_t *wcpncpy(wchar_t *dest, const wchar_t *src, size_t n);
13
14   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
15
16       wcpncpy():
17           Since glibc 2.10:
18               _POSIX_C_SOURCE >= 200809L
19           Before glibc 2.10:
20               _GNU_SOURCE
21

DESCRIPTION

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

RETURN VALUE

38       wcpncpy() returns a pointer to the last wide  character  written,  that
39       is, dest+n-1.
40

ATTRIBUTES

42       For   an   explanation   of   the  terms  used  in  this  section,  see
43       attributes(7).
44
45       ┌──────────┬───────────────┬─────────┐
46Interface Attribute     Value   
47       ├──────────┼───────────────┼─────────┤
48wcpncpy() │ Thread safety │ MT-Safe │
49       └──────────┴───────────────┴─────────┘

CONFORMING TO

51       POSIX.1-2008.
52

SEE ALSO

54       stpncpy(3), wcsncpy(3)
55

COLOPHON

57       This page is part of release 5.04 of the Linux  man-pages  project.   A
58       description  of  the project, information about reporting bugs, and the
59       latest    version    of    this    page,    can     be     found     at
60       https://www.kernel.org/doc/man-pages/.
61
62
63
64GNU                               2019-03-06                        WCPNCPY(3)
Impressum