]>
Commit | Line | Data |
---|---|---|
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 | 14 | .\" |
97986708 | 15 | .TH WCPNCPY 3 2016-03-15 "GNU" "Linux Programmer's Manual" |
fea681da | 16 | .SH NAME |
c13182ef | 17 | wcpncpy \- copy a fixed-size string of wide characters, |
35478399 | 18 | returning a pointer to its end |
fea681da MK |
19 | .SH SYNOPSIS |
20 | .nf | |
fea681da | 21 | .B #include <wchar.h> |
68e4db0a | 22 | .PP |
fea681da MK |
23 | .BI "wchar_t *wcpncpy(wchar_t *" dest ", const wchar_t *" src ", size_t " n ); |
24 | .fi | |
68e4db0a | 25 | .PP |
d834047b MK |
26 | .in -4n |
27 | Feature Test Macro Requirements for glibc (see | |
28 | .BR feature_test_macros (7)): | |
29 | .in | |
68e4db0a | 30 | .PP |
d834047b | 31 | .BR wcpncpy (): |
ea91c3fd MK |
32 | .PD 0 |
33 | .ad l | |
34 | .RS 4 | |
35 | .TP 4 | |
36 | Since glibc 2.10: | |
b0da7b8b | 37 | _POSIX_C_SOURCE\ >=\ 200809L |
ea91c3fd | 38 | .TP |
d834047b MK |
39 | Before glibc 2.10: |
40 | _GNU_SOURCE | |
ea91c3fd MK |
41 | .RE |
42 | .ad | |
43 | .PD | |
fea681da | 44 | .SH DESCRIPTION |
60a90ecd MK |
45 | The |
46 | .BR wcpncpy () | |
47 | function is the wide-character equivalent | |
48 | of the | |
49 | .BR stpncpy (3) | |
50 | function. | |
e4a0d6cb MK |
51 | It copies at most |
52 | .I n | |
53 | wide characters from the wide-character | |
54 | string pointed to by | |
55 | .IR src , | |
e9c23bc6 | 56 | including the terminating null wide (L\(aq\\0\(aq), |
e4a0d6cb MK |
57 | to the array pointed to by |
58 | .IR dest . | |
59 | Exactly | |
60 | .I n | |
61 | wide characters are | |
62 | written at | |
63 | .IR dest . | |
64 | If the length | |
65 | .IR wcslen(src) | |
66 | is smaller than | |
67 | .IR n , | |
c13182ef | 68 | the remaining wide characters in the array pointed to |
e4a0d6cb MK |
69 | by |
70 | .I dest | |
71 | are filled with L\(aq\\0\(aq characters. | |
72 | If the length | |
73 | .IR wcslen(src) | |
ca5d006f | 74 | is greater than or equal |
e4a0d6cb MK |
75 | to |
76 | .IR n , | |
77 | the string pointed to by | |
78 | .I dest | |
79 | will | |
f81fb444 | 80 | not be L\(aq\\0\(aq terminated. |
fea681da MK |
81 | .PP |
82 | The strings may not overlap. | |
83 | .PP | |
e4a0d6cb MK |
84 | The programmer must ensure that there is room for at least |
85 | .I n | |
86 | wide | |
87 | characters at | |
88 | .IR dest . | |
47297adb | 89 | .SH RETURN VALUE |
60a90ecd | 90 | .BR wcpncpy () |
75b94dc3 | 91 | returns a pointer to the last wide character written, that is, |
be88a268 | 92 | .IR dest + n \-1. |
31c861cf | 93 | .SH ATTRIBUTES |
fbdd176b PH |
94 | For an explanation of the terms used in this section, see |
95 | .BR attributes (7). | |
96 | .TS | |
97 | allbox; | |
98 | lb lb lb | |
99 | l l l. | |
100 | Interface Attribute Value | |
101 | T{ | |
31c861cf | 102 | .BR wcpncpy () |
fbdd176b PH |
103 | T} Thread safety MT-Safe |
104 | .TE | |
47297adb | 105 | .SH CONFORMING TO |
d9a8bda4 | 106 | POSIX.1-2008. |
47297adb | 107 | .SH SEE ALSO |
fea681da | 108 | .BR stpncpy (3), |
0a4f8b7b | 109 | .BR wcsncpy (3) |