]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/wcsncpy.3
pow.3: Minor tweak to BUGS
[thirdparty/man-pages.git] / man3 / wcsncpy.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
MK
14.\" ISO/IEC 9899:1999
15.\"
9ba01802 16.TH WCSNCPY 3 2019-03-06 "GNU" "Linux Programmer's Manual"
fea681da
MK
17.SH NAME
18wcsncpy \- copy a fixed-size string of wide characters
19.SH SYNOPSIS
20.nf
21.B #include <wchar.h>
68e4db0a 22.PP
fea681da
MK
23.BI "wchar_t *wcsncpy(wchar_t *" dest ", const wchar_t *" src ", size_t " n );
24.fi
25.SH DESCRIPTION
60a90ecd
MK
26The
27.BR wcsncpy ()
28function is the wide-character equivalent of the
29.BR strncpy (3)
30function.
40aa0db0
MK
31It copies at most
32.I n
33wide characters from the wide-character
34string pointed to by
35.IR src ,
d1a71985 36including the terminating null wide character (L\(aq\e0\(aq),
40aa0db0
MK
37to the array pointed to by
38.IR dest .
39Exactly
40.I n
41wide characters are
42written at
43.IR dest .
44If the length \fIwcslen(src)\fP is smaller than
45.IR n ,
c13182ef 46the remaining wide characters in the array
40aa0db0
MK
47pointed to by
48.I dest
49are filled
e9c23bc6 50with null wide characters.
4bd05f8f 51If the length \fIwcslen(src)\fP is greater than or equal
40aa0db0
MK
52to
53.IR n ,
54the string pointed to by
55.I dest
e9c23bc6 56will not be terminated by a null wide character.
fea681da
MK
57.PP
58The strings may not overlap.
59.PP
40aa0db0
MK
60The programmer must ensure that there is room for at least
61.I n
62wide
63characters at
64.IR dest .
47297adb 65.SH RETURN VALUE
60a90ecd 66.BR wcsncpy ()
40aa0db0
MK
67returns
68.IR dest .
c126be22 69.SH ATTRIBUTES
78b79464
PH
70For an explanation of the terms used in this section, see
71.BR attributes (7).
72.TS
73allbox;
74lb lb lb
75l l l.
76Interface Attribute Value
77T{
c126be22 78.BR wcsncpy ()
78b79464
PH
79T} Thread safety MT-Safe
80.TE
47297adb 81.SH CONFORMING TO
69b4132c 82POSIX.1-2001, POSIX.1-2008, C99.
47297adb 83.SH SEE ALSO
fea681da 84.BR strncpy (3)