OSDN Git Service

(split) LDP man-pages の original/ を v3.30 に更新。
[linuxjm/LDP_man-pages.git] / 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 2010-09-15 "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 #include <wchar.h>
20 .sp
21 .BI "wchar_t *wcpncpy(wchar_t *" dest ", const wchar_t *" src ", size_t " n );
22 .fi
23 .sp
24 .in -4n
25 Feature Test Macro Requirements for glibc (see
26 .BR feature_test_macros (7)):
27 .in
28 .sp
29 .BR wcpncpy ():
30 .PD 0
31 .ad l
32 .RS 4
33 .TP 4
34 Since glibc 2.10:
35 _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
36 .TP
37 Before glibc 2.10:
38 _GNU_SOURCE
39 .RE
40 .ad
41 .PD
42 .SH DESCRIPTION
43 The
44 .BR wcpncpy ()
45 function is the wide-character equivalent
46 of the
47 .BR stpncpy (3)
48 function.
49 It copies at most \fIn\fP wide characters from the wide-character
50 string pointed to by \fIsrc\fP,
51 including the terminating L\(aq\\0\(aq character,
52 to the array pointed to by \fIdest\fP.
53 Exactly \fIn\fP wide characters are
54 written at \fIdest\fP.
55 If the length \fIwcslen(src)\fP is smaller than \fIn\fP,
56 the remaining wide characters in the array pointed to
57 by \fIdest\fP are filled with L\(aq\\0\(aq characters.
58 If the length \fIwcslen(src)\fP is greater or equal
59 to \fIn\fP, the string pointed to by \fIdest\fP will
60 not be L\(aq\\0\(aq terminated.
61 .PP
62 The strings may not overlap.
63 .PP
64 The programmer must ensure that there is room for at least \fIn\fP wide
65 characters at \fIdest\fP.
66 .SH "RETURN VALUE"
67 .BR wcpncpy ()
68 returns a pointer to the last wide character written, that is,
69 \fIdest + n \- 1\fP.
70 .SH "CONFORMING TO"
71 This function is a GNU extension.
72 .SH "SEE ALSO"
73 .BR stpncpy (3),
74 .BR wcsncpy (3)