]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/wcpncpy.3
Import of man-pages 1.70
[thirdparty/man-pages.git] / man3 / wcpncpy.3
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
15 wcpncpy \- copy a fixed-size string of wide characters, returning a pointer to its end
16 .SH SYNOPSIS
17 .nf
18 .B #define _GNU_SOURCE
19 .br
20 .B #include <wchar.h>
21 .sp
22 .BI "wchar_t *wcpncpy(wchar_t *" dest ", const wchar_t *" src ", size_t " n );
23 .fi
24 .SH DESCRIPTION
25 The \fBwcpncpy\fP function is the wide-character equivalent of the \fBstpncpy\fP
26 function. It copies at most \fIn\fP wide characters from the wide-character
27 string pointed to by \fIsrc\fP, including the terminating L'\\0' character,
28 to the array pointed to by \fIdest\fP. Exactly \fIn\fP wide characters are
29 written at \fIdest\fP. If the length \fIwcslen(src)\fP is smaller than \fIn\fP,
30 the remaining wide characters in the array pointed to by \fIdest\fP are filled
31 with L'\\0' characters. If the length \fIwcslen(src)\fP is greater or equal
32 to \fIn\fP, the string pointed to by \fIdest\fP will not be L'\\0' terminated.
33 .PP
34 The strings may not overlap.
35 .PP
36 The programmer must ensure that there is room for at least \fIn\fP wide
37 characters at \fIdest\fP.
38 .SH "RETURN VALUE"
39 \fBwcpncpy\fP returns a pointer to the last wide character written, i.e.
40 \fIdest + n - 1\fP.
41 .SH "CONFORMING TO"
42 This function is a GNU extension.
43 .SH "SEE ALSO"
44 .BR stpncpy (3),
45 .BR wcsncpy (3)