OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / original / 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,
16 returning a pointer to its end
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
26 The
27 .BR wcpncpy ()
28 function is the wide-character equivalent
29 of the
30 .BR stpncpy (3)
31 function.
32 It copies at most \fIn\fP wide characters from the wide-character
33 string pointed to by \fIsrc\fP,
34 including the terminating L\(aq\\0\(aq character,
35 to the array pointed to by \fIdest\fP.
36 Exactly \fIn\fP wide characters are
37 written at \fIdest\fP.
38 If the length \fIwcslen(src)\fP is smaller than \fIn\fP,
39 the remaining wide characters in the array pointed to
40 by \fIdest\fP are filled with L\(aq\\0\(aq characters.
41 If the length \fIwcslen(src)\fP is greater or equal
42 to \fIn\fP, the string pointed to by \fIdest\fP will
43 not be L\(aq\\0\(aq terminated.
44 .PP
45 The strings may not overlap.
46 .PP
47 The programmer must ensure that there is room for at least \fIn\fP wide
48 characters at \fIdest\fP.
49 .SH "RETURN VALUE"
50 .BR wcpncpy ()
51 returns a pointer to the last wide character written, that is,
52 \fIdest + n \- 1\fP.
53 .SH "CONFORMING TO"
54 This function is a GNU extension.
55 .SH "SEE ALSO"
56 .BR stpncpy (3),
57 .BR wcsncpy (3),
58 .BR feature_test_macros (7)