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