futex.2: Rework the description of FUTEX_LOCK_PI2
[man-pages.git] / man3 / memccpy.3
blobed0cb2b9762980ad8d896f5a6cf08235f4242e4b
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .\" References consulted:
26 .\"     Linux libc source code
27 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
28 .\"     386BSD man pages
29 .\" Modified Sat Jul 24 18:57:24 1993 by Rik Faith (faith@cs.unc.edu)
30 .TH MEMCCPY 3  2021-03-22 "GNU" "Linux Programmer's Manual"
31 .SH NAME
32 memccpy \- copy memory area
33 .SH SYNOPSIS
34 .nf
35 .B #include <string.h>
36 .PP
37 .BI "void *memccpy(void *restrict " dest ", const void *restrict " src ,
38 .BI "              int " c ", size_t " n );
39 .fi
40 .SH DESCRIPTION
41 The
42 .BR memccpy ()
43 function copies no more than
44 .I n
45 bytes from
46 memory area
47 .I src
48 to memory area
49 .IR dest ,
50 stopping when the
51 character
52 .I c
53 is found.
54 .PP
55 If the memory areas overlap, the results are undefined.
56 .SH RETURN VALUE
57 The
58 .BR memccpy ()
59 function returns a pointer to the next character
61 .IR dest
62 after
63 .IR c ,
64 or NULL if
65 .I c
66 was not found in the
67 first
68 .I n
69 characters of
70 .IR src .
71 .SH ATTRIBUTES
72 For an explanation of the terms used in this section, see
73 .BR attributes (7).
74 .ad l
75 .nh
76 .TS
77 allbox;
78 lbx lb lb
79 l l l.
80 Interface       Attribute       Value
82 .BR memccpy ()
83 T}      Thread safety   MT-Safe
84 .TE
85 .hy
86 .ad
87 .sp 1
88 .SH CONFORMING TO
89 POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
90 .SH SEE ALSO
91 .BR bcopy (3),
92 .BR bstring (3),
93 .BR memcpy (3),
94 .BR memmove (3),
95 .BR strcpy (3),
96 .BR strncpy (3)