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()  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 to
23       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,  i.e.
32       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
40
41
42GNU                               2003-11-01                        WCPNCPY(3)
Impressum