mount_setattr.2: Minor tweaks to Christian's patch
[man-pages.git] / man3 / wcpcpy.3
blob38cca5b38cfea35c3992945cf70bab4abf22b702
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
3 .\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
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.
8 .\" %%%LICENSE_END
9 .\"
10 .\" References consulted:
11 .\"   GNU glibc-2 source code and manual
12 .\"   Dinkumware C library reference http://www.dinkumware.com/
13 .\"   OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
14 .\"
15 .TH WCPCPY 3  2021-03-22 "GNU" "Linux Programmer's Manual"
16 .SH NAME
17 wcpcpy \- copy a wide-character string, returning a pointer to its end
18 .SH SYNOPSIS
19 .nf
20 .B #include <wchar.h>
21 .PP
22 .BI "wchar_t *wcpcpy(wchar_t *restrict " dest \
23 ", const wchar_t *restrict " src );
24 .fi
25 .PP
26 .RS -4
27 Feature Test Macro Requirements for glibc (see
28 .BR feature_test_macros (7)):
29 .RE
30 .PP
31 .BR wcpcpy ():
32 .nf
33     Since glibc 2.10:
34         _POSIX_C_SOURCE >= 200809L
35     Before glibc 2.10:
36         _GNU_SOURCE
37 .fi
38 .SH DESCRIPTION
39 The
40 .BR wcpcpy ()
41 function is the wide-character equivalent of the
42 .BR stpcpy (3)
43 function.
44 It copies the wide-character string pointed to by
45 .IR src ,
46 including the terminating null wide character (L\(aq\e0\(aq),
47 to the array pointed to by
48 .IR dest .
49 .PP
50 The strings may not overlap.
51 .PP
52 The programmer must ensure that there
53 is room for at least
54 .IR wcslen(src)+1
55 wide characters at
56 .IR dest .
57 .SH RETURN VALUE
58 .BR wcpcpy ()
59 returns a pointer to the end of the wide-character string
60 .IR dest ,
61 that is, a pointer to the terminating null wide character.
62 .SH ATTRIBUTES
63 For an explanation of the terms used in this section, see
64 .BR attributes (7).
65 .ad l
66 .nh
67 .TS
68 allbox;
69 lbx lb lb
70 l l l.
71 Interface       Attribute       Value
73 .BR wcpcpy ()
74 T}      Thread safety   MT-Safe
75 .TE
76 .hy
77 .ad
78 .sp 1
79 .SH CONFORMING TO
80 POSIX.1-2008.
81 .SH SEE ALSO
82 .BR strcpy (3),
83 .BR wcscpy (3)