]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/wcpncpy.3
man*/: ffix (un-bracket tables)
[thirdparty/man-pages.git] / man3 / wcpncpy.3
CommitLineData
a1eaacb1 1'\" t
fea681da
MK
2.\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
3.\"
e4a74ca8 4.\" SPDX-License-Identifier: GPL-2.0-or-later
fea681da
MK
5.\"
6.\" References consulted:
7.\" GNU glibc-2 source code and manual
8.\" Dinkumware C library reference http://www.dinkumware.com/
008f1ecc 9.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
fea681da 10.\"
4c1c5274 11.TH wcpncpy 3 (date) "Linux man-pages (unreleased)"
fea681da 12.SH NAME
c13182ef 13wcpncpy \- copy a fixed-size string of wide characters,
35478399 14returning a pointer to its end
3484f4a1
AC
15.SH LIBRARY
16Standard C library
8fc3b2cf 17.RI ( libc ", " \-lc )
fea681da
MK
18.SH SYNOPSIS
19.nf
fea681da 20.B #include <wchar.h>
68e4db0a 21.PP
1eed67e7
AC
22.BI "wchar_t *wcpncpy(wchar_t " dest "[restrict ." n ],
23.BI " const wchar_t " src "[restrict ." n ],
a216fe2a 24.BI " size_t " n );
fea681da 25.fi
68e4db0a 26.PP
d39ad78f 27.RS -4
d834047b
MK
28Feature Test Macro Requirements for glibc (see
29.BR feature_test_macros (7)):
d39ad78f 30.RE
68e4db0a 31.PP
d834047b 32.BR wcpncpy ():
9d2adbae
MK
33.nf
34 Since glibc 2.10:
5c10d2c5 35 _POSIX_C_SOURCE >= 200809L
9d2adbae
MK
36 Before glibc 2.10:
37 _GNU_SOURCE
38.fi
fea681da 39.SH DESCRIPTION
60a90ecd
MK
40The
41.BR wcpncpy ()
42function is the wide-character equivalent
43of the
44.BR stpncpy (3)
45function.
e4a0d6cb
MK
46It copies at most
47.I n
48wide characters from the wide-character
49string pointed to by
50.IR src ,
b957f81f 51including the terminating null wide (L\[aq]\e0\[aq]),
e4a0d6cb
MK
52to the array pointed to by
53.IR dest .
54Exactly
55.I n
56wide characters are
57written at
58.IR dest .
59If the length
1ae6b2c7 60.I wcslen(src)
e4a0d6cb
MK
61is smaller than
62.IR n ,
c13182ef 63the remaining wide characters in the array pointed to
e4a0d6cb
MK
64by
65.I dest
b957f81f 66are filled with L\[aq]\e0\[aq] characters.
e4a0d6cb 67If the length
1ae6b2c7 68.I wcslen(src)
ca5d006f 69is greater than or equal
e4a0d6cb
MK
70to
71.IR n ,
72the string pointed to by
73.I dest
74will
b957f81f 75not be L\[aq]\e0\[aq] terminated.
fea681da
MK
76.PP
77The strings may not overlap.
78.PP
e4a0d6cb
MK
79The programmer must ensure that there is room for at least
80.I n
81wide
82characters at
83.IR dest .
47297adb 84.SH RETURN VALUE
60a90ecd 85.BR wcpncpy ()
75b94dc3 86returns a pointer to the last wide character written, that is,
be88a268 87.IR dest + n \-1.
31c861cf 88.SH ATTRIBUTES
fbdd176b
PH
89For an explanation of the terms used in this section, see
90.BR attributes (7).
91.TS
92allbox;
c466875e 93lbx lb lb
fbdd176b
PH
94l l l.
95Interface Attribute Value
96T{
9e54434e
BR
97.na
98.nh
31c861cf 99.BR wcpncpy ()
fbdd176b
PH
100T} Thread safety MT-Safe
101.TE
c466875e 102.sp 1
3113c7f3 103.SH STANDARDS
d9a8bda4 104POSIX.1-2008.
47297adb 105.SH SEE ALSO
fea681da 106.BR stpncpy (3),
0a4f8b7b 107.BR wcsncpy (3)