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

NAME

6       wcsncpy - copy part of a wide-character string
7

SYNOPSIS

9       #include <wchar.h>
10
11       wchar_t *wcsncpy(wchar_t *restrict ws1, const wchar_t *restrict ws2,
12              size_t n);
13
14

DESCRIPTION

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

RETURN VALUE

28       The wcsncpy() function shall return ws1; no return value is reserved to
29       indicate an error.
30

ERRORS

32       No errors are defined.
33
34       The following sections are informative.
35

EXAMPLES

37       None.
38

APPLICATION USAGE

40       If  there  is no null wide-character code in the first n wide-character
41       codes of the array pointed to by ws2, the  result  is  not  null-termi‐
42       nated.
43

RATIONALE

45       None.
46

FUTURE DIRECTIONS

48       None.
49

SEE ALSO

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