Debian Codegraph @

upstream/debian-unstable/man3/wcpcpy.3

raw
1 '\" t
2 .\" Copyright, Bruno Haible <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: GPL-2.0-or-later
6 .\"
7 .TH wcpcpy 3 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 wcpcpy \- copy a wide-character string, returning a pointer to its end
10 .SH LIBRARY
11 Standard C library
12 .RI ( libc ,\~ \-lc )
13 .SH SYNOPSIS
14 .nf
15 .B #include <wchar.h>
16 .P
17 .BI "wchar_t *wcpcpy(wchar_t *restrict " dest \
18 ", const wchar_t *restrict " src );
19 .fi
20 .P
21 .RS -4
22 Feature Test Macro Requirements for glibc (see
23 .BR feature_test_macros (7)):
24 .RE
25 .P
26 .BR wcpcpy ():
27 .nf
28 Since glibc 2.10:
29 _POSIX_C_SOURCE >= 200809L
30 Before glibc 2.10:
31 _GNU_SOURCE
32 .fi
33 .SH DESCRIPTION
34 The
35 .BR wcpcpy ()
36 function is the wide-character equivalent of the
37 .BR stpcpy (3)
38 function.
39 It copies the wide-character string pointed to by
40 .IR src ,
41 including the terminating null wide character (L\[aq]\[rs]0\[aq]),
42 to the array pointed to by
43 .IR dest .
44 .P
45 The strings may not overlap.
46 .P
47 The programmer must ensure that there
48 is room for at least
49 .I wcslen(src)+1
50 wide characters at
51 .IR dest .
52 .SH RETURN VALUE
53 .BR wcpcpy ()
54 returns a pointer to the end of the wide-character string
55 .IR dest ,
56 that is, a pointer to the terminating null wide character.
57 .SH ATTRIBUTES
58 For an explanation of the terms used in this section, see
59 .BR attributes (7).
60 .TS
61 allbox;
62 lbx lb lb
63 l l l.
64 Interface Attribute Value
65 T{
66 .na
67 .nh
68 .BR wcpcpy ()
69 T} Thread safety MT-Safe
70 .TE
71 .SH STANDARDS
72 POSIX.1-2008.
73 .SH SEE ALSO
74 .BR strcpy (3),
75 .BR wcscpy (3)