]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/wcpncpy.3
Start of man-pages-5.01: updating Changes and Changes.old
[thirdparty/man-pages.git] / man3 / wcpncpy.3
CommitLineData
fea681da
MK
1.\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2.\"
89e3ffe9 3.\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
fea681da
MK
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.
fe382ebf 8.\" %%%LICENSE_END
fea681da
MK
9.\"
10.\" References consulted:
11.\" GNU glibc-2 source code and manual
12.\" Dinkumware C library reference http://www.dinkumware.com/
008f1ecc 13.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
fea681da 14.\"
9ba01802 15.TH WCPNCPY 3 2019-03-06 "GNU" "Linux Programmer's Manual"
fea681da 16.SH NAME
c13182ef 17wcpncpy \- copy a fixed-size string of wide characters,
35478399 18returning a pointer to its end
fea681da
MK
19.SH SYNOPSIS
20.nf
fea681da 21.B #include <wchar.h>
68e4db0a 22.PP
fea681da
MK
23.BI "wchar_t *wcpncpy(wchar_t *" dest ", const wchar_t *" src ", size_t " n );
24.fi
68e4db0a 25.PP
d834047b
MK
26.in -4n
27Feature Test Macro Requirements for glibc (see
28.BR feature_test_macros (7)):
29.in
68e4db0a 30.PP
d834047b 31.BR wcpncpy ():
ea91c3fd
MK
32.PD 0
33.ad l
34.RS 4
35.TP 4
36Since glibc 2.10:
b0da7b8b 37_POSIX_C_SOURCE\ >=\ 200809L
ea91c3fd 38.TP
d834047b
MK
39Before glibc 2.10:
40_GNU_SOURCE
ea91c3fd
MK
41.RE
42.ad
43.PD
fea681da 44.SH DESCRIPTION
60a90ecd
MK
45The
46.BR wcpncpy ()
47function is the wide-character equivalent
48of the
49.BR stpncpy (3)
50function.
e4a0d6cb
MK
51It copies at most
52.I n
53wide characters from the wide-character
54string pointed to by
55.IR src ,
d1a71985 56including the terminating null wide (L\(aq\e0\(aq),
e4a0d6cb
MK
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 ,
c13182ef 68the remaining wide characters in the array pointed to
e4a0d6cb
MK
69by
70.I dest
d1a71985 71are filled with L\(aq\e0\(aq characters.
e4a0d6cb
MK
72If the length
73.IR wcslen(src)
ca5d006f 74is greater than or equal
e4a0d6cb
MK
75to
76.IR n ,
77the string pointed to by
78.I dest
79will
d1a71985 80not be L\(aq\e0\(aq terminated.
fea681da
MK
81.PP
82The strings may not overlap.
83.PP
e4a0d6cb
MK
84The programmer must ensure that there is room for at least
85.I n
86wide
87characters at
88.IR dest .
47297adb 89.SH RETURN VALUE
60a90ecd 90.BR wcpncpy ()
75b94dc3 91returns a pointer to the last wide character written, that is,
be88a268 92.IR dest + n \-1.
31c861cf 93.SH ATTRIBUTES
fbdd176b
PH
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{
31c861cf 102.BR wcpncpy ()
fbdd176b
PH
103T} Thread safety MT-Safe
104.TE
47297adb 105.SH CONFORMING TO
d9a8bda4 106POSIX.1-2008.
47297adb 107.SH SEE ALSO
fea681da 108.BR stpncpy (3),
0a4f8b7b 109.BR wcsncpy (3)