]> git.ipfire.org Git - thirdparty/man-pages.git/blame_incremental - man3/wcpncpy.3
Start of man-pages-5.01: updating Changes and Changes.old
[thirdparty/man-pages.git] / man3 / wcpncpy.3
... / ...
CommitLineData
1.\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2.\"
3.\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
4.\" This is free documentation; you can redistribute it and/or
5.\" modify it under the terms of the GNU General Public License as
6.\" published by the Free Software Foundation; either version 2 of
7.\" the License, or (at your option) any later version.
8.\" %%%LICENSE_END
9.\"
10.\" References consulted:
11.\" GNU glibc-2 source code and manual
12.\" Dinkumware C library reference http://www.dinkumware.com/
13.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
14.\"
15.TH WCPNCPY 3 2019-03-06 "GNU" "Linux Programmer's Manual"
16.SH NAME
17wcpncpy \- copy a fixed-size string of wide characters,
18returning a pointer to its end
19.SH SYNOPSIS
20.nf
21.B #include <wchar.h>
22.PP
23.BI "wchar_t *wcpncpy(wchar_t *" dest ", const wchar_t *" src ", size_t " n );
24.fi
25.PP
26.in -4n
27Feature Test Macro Requirements for glibc (see
28.BR feature_test_macros (7)):
29.in
30.PP
31.BR wcpncpy ():
32.PD 0
33.ad l
34.RS 4
35.TP 4
36Since glibc 2.10:
37_POSIX_C_SOURCE\ >=\ 200809L
38.TP
39Before glibc 2.10:
40_GNU_SOURCE
41.RE
42.ad
43.PD
44.SH DESCRIPTION
45The
46.BR wcpncpy ()
47function is the wide-character equivalent
48of the
49.BR stpncpy (3)
50function.
51It copies at most
52.I n
53wide characters from the wide-character
54string pointed to by
55.IR src ,
56including the terminating null wide (L\(aq\e0\(aq),
57to the array pointed to by
58.IR dest .
59Exactly
60.I n
61wide characters are
62written at
63.IR dest .
64If the length
65.IR wcslen(src)
66is smaller than
67.IR n ,
68the remaining wide characters in the array pointed to
69by
70.I dest
71are filled with L\(aq\e0\(aq characters.
72If the length
73.IR wcslen(src)
74is greater than or equal
75to
76.IR n ,
77the string pointed to by
78.I dest
79will
80not be L\(aq\e0\(aq terminated.
81.PP
82The strings may not overlap.
83.PP
84The programmer must ensure that there is room for at least
85.I n
86wide
87characters at
88.IR dest .
89.SH RETURN VALUE
90.BR wcpncpy ()
91returns a pointer to the last wide character written, that is,
92.IR dest + n \-1.
93.SH ATTRIBUTES
94For an explanation of the terms used in this section, see
95.BR attributes (7).
96.TS
97allbox;
98lb lb lb
99l l l.
100Interface Attribute Value
101T{
102.BR wcpncpy ()
103T} Thread safety MT-Safe
104.TE
105.SH CONFORMING TO
106POSIX.1-2008.
107.SH SEE ALSO
108.BR stpncpy (3),
109.BR wcsncpy (3)