1WCSNCPY(3P)                POSIX Programmer's Manual               WCSNCPY(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       wcsncpy - copy part of a wide-character string
13

SYNOPSIS

15       #include <wchar.h>
16
17       wchar_t *wcsncpy(wchar_t *restrict ws1, const wchar_t *restrict ws2,
18              size_t n);
19
20

DESCRIPTION

22       The wcsncpy() function shall copy not more than n wide-character  codes
23       (wide-character  codes  that  follow a null wide-character code are not
24       copied) from the array pointed to by ws2 to the  array  pointed  to  by
25       ws1.  If copying takes place between objects that overlap, the behavior
26       is undefined.
27
28       If the array pointed to by ws2  is  a  wide-character  string  that  is
29       shorter than n wide-character codes, null wide-character codes shall be
30       appended to the copy in the array pointed to by ws1, until n wide-char‐
31       acter codes in all are written.
32

RETURN VALUE

34       The wcsncpy() function shall return ws1; no return value is reserved to
35       indicate an error.
36

ERRORS

38       No errors are defined.
39
40       The following sections are informative.
41

EXAMPLES

43       None.
44

APPLICATION USAGE

46       If there is no null wide-character code in the first  n  wide-character
47       codes  of  the  array  pointed to by ws2, the result is not null-termi‐
48       nated.
49

RATIONALE

51       None.
52

FUTURE DIRECTIONS

54       None.
55

SEE ALSO

57       wcscpy(),  the  Base  Definitions   volume   of   IEEE Std 1003.1-2001,
58       <wchar.h>
59
61       Portions  of  this text are reprinted and reproduced in electronic form
62       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
63       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
64       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
65       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
66       event of any discrepancy between this version and the original IEEE and
67       The  Open Group Standard, the original IEEE and The Open Group Standard
68       is the referee document. The original Standard can be  obtained  online
69       at http://www.opengroup.org/unix/online.html .
70
71
72
73IEEE/The Open Group                  2003                          WCSNCPY(3P)
Impressum