]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/wcpncpy.3
Wrapped long lines, wrapped at sentence boundaries; stripped trailing
[thirdparty/man-pages.git] / man3 / wcpncpy.3
CommitLineData
fea681da
MK
1.\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2.\"
3.\" This is free documentation; you can redistribute it and/or
4.\" modify it under the terms of the GNU General Public License as
5.\" published by the Free Software Foundation; either version 2 of
6.\" the License, or (at your option) any later version.
7.\"
8.\" References consulted:
9.\" GNU glibc-2 source code and manual
10.\" Dinkumware C library reference http://www.dinkumware.com/
11.\" OpenGroup's Single Unix specification http://www.UNIX-systems.org/online.html
12.\"
13.TH WCPNCPY 3 2003-11-01 "GNU" "Linux Programmer's Manual"
14.SH NAME
c13182ef 15wcpncpy \- copy a fixed-size string of wide characters,
35478399 16returning a pointer to its end
fea681da
MK
17.SH SYNOPSIS
18.nf
19.B #define _GNU_SOURCE
20.br
21.B #include <wchar.h>
22.sp
23.BI "wchar_t *wcpncpy(wchar_t *" dest ", const wchar_t *" src ", size_t " n );
24.fi
25.SH DESCRIPTION
c13182ef
MK
26The \fBwcpncpy\fP() function is the wide-character equivalent
27of the \fBstpncpy\fP() function.
28It copies at most \fIn\fP wide characters from the wide-character
fea681da 29string pointed to by \fIsrc\fP, including the terminating L'\\0' character,
c13182ef
MK
30to the array pointed to by \fIdest\fP.
31Exactly \fIn\fP wide characters are
32written at \fIdest\fP.
33If the length \fIwcslen(src)\fP is smaller than \fIn\fP,
34the remaining wide characters in the array pointed to
35by \fIdest\fP are filled with L'\\0' characters.
36If the length \fIwcslen(src)\fP is greater or equal
37to \fIn\fP, the string pointed to by \fIdest\fP will
38not be L'\\0' terminated.
fea681da
MK
39.PP
40The strings may not overlap.
41.PP
42The programmer must ensure that there is room for at least \fIn\fP wide
43characters at \fIdest\fP.
44.SH "RETURN VALUE"
e511ffb6 45\fBwcpncpy\fP() returns a pointer to the last wide character written, i.e.
c65433e6 46\fIdest + n \- 1\fP.
fea681da
MK
47.SH "CONFORMING TO"
48This function is a GNU extension.
49.SH "SEE ALSO"
50.BR stpncpy (3),
0a90178c
MK
51.BR wcsncpy (3),
52.BR feature_test_macros (7)