]>
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 MK |
14 | .\" ISO/IEC 9899:1999 |
15 | .\" | |
460495ca | 16 | .TH WCSNCPY 3 2015-08-08 "GNU" "Linux Programmer's Manual" |
fea681da MK |
17 | .SH NAME |
18 | wcsncpy \- copy a fixed-size string of wide characters | |
19 | .SH SYNOPSIS | |
20 | .nf | |
21 | .B #include <wchar.h> | |
22 | .sp | |
23 | .BI "wchar_t *wcsncpy(wchar_t *" dest ", const wchar_t *" src ", size_t " n ); | |
24 | .fi | |
25 | .SH DESCRIPTION | |
60a90ecd MK |
26 | The |
27 | .BR wcsncpy () | |
28 | function is the wide-character equivalent of the | |
29 | .BR strncpy (3) | |
30 | function. | |
40aa0db0 MK |
31 | It copies at most |
32 | .I n | |
33 | wide characters from the wide-character | |
34 | string pointed to by | |
35 | .IR src , | |
e9c23bc6 | 36 | including the terminating null wide character (L\(aq\\0\(aq), |
40aa0db0 MK |
37 | to the array pointed to by |
38 | .IR dest . | |
39 | Exactly | |
40 | .I n | |
41 | wide characters are | |
42 | written at | |
43 | .IR dest . | |
44 | If the length \fIwcslen(src)\fP is smaller than | |
45 | .IR n , | |
c13182ef | 46 | the remaining wide characters in the array |
40aa0db0 MK |
47 | pointed to by |
48 | .I dest | |
49 | are filled | |
e9c23bc6 | 50 | with null wide characters. |
4bd05f8f | 51 | If the length \fIwcslen(src)\fP is greater than or equal |
40aa0db0 MK |
52 | to |
53 | .IR n , | |
54 | the string pointed to by | |
55 | .I dest | |
e9c23bc6 | 56 | will not be terminated by a null wide character. |
fea681da MK |
57 | .PP |
58 | The strings may not overlap. | |
59 | .PP | |
40aa0db0 MK |
60 | The programmer must ensure that there is room for at least |
61 | .I n | |
62 | wide | |
63 | characters at | |
64 | .IR dest . | |
47297adb | 65 | .SH RETURN VALUE |
60a90ecd | 66 | .BR wcsncpy () |
40aa0db0 MK |
67 | returns |
68 | .IR dest . | |
c126be22 | 69 | .SH ATTRIBUTES |
78b79464 PH |
70 | For an explanation of the terms used in this section, see |
71 | .BR attributes (7). | |
72 | .TS | |
73 | allbox; | |
74 | lb lb lb | |
75 | l l l. | |
76 | Interface Attribute Value | |
77 | T{ | |
c126be22 | 78 | .BR wcsncpy () |
78b79464 PH |
79 | T} Thread safety MT-Safe |
80 | .TE | |
47297adb | 81 | .SH CONFORMING TO |
69b4132c | 82 | POSIX.1-2001, POSIX.1-2008, C99. |
47297adb | 83 | .SH SEE ALSO |
fea681da | 84 | .BR strncpy (3) |