]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/memccpy.3
01f5d69bc065dea714b7315a484d108acecde352
[thirdparty/man-pages.git] / man3 / memccpy.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
4 .\"
5 .\" References consulted:
6 .\" Linux libc source code
7 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
8 .\" 386BSD man pages
9 .\" Modified Sat Jul 24 18:57:24 1993 by Rik Faith (faith@cs.unc.edu)
10 .TH MEMCCPY 3 2021-03-22 "GNU" "Linux Programmer's Manual"
11 .SH NAME
12 memccpy \- copy memory area
13 .SH LIBRARY
14 Standard C library
15 .RI ( libc ", " \-lc )
16 .SH SYNOPSIS
17 .nf
18 .B #include <string.h>
19 .PP
20 .BI "void *memccpy(void *restrict " dest ", const void *restrict " src ,
21 .BI " int " c ", size_t " n );
22 .fi
23 .SH DESCRIPTION
24 The
25 .BR memccpy ()
26 function copies no more than
27 .I n
28 bytes from
29 memory area
30 .I src
31 to memory area
32 .IR dest ,
33 stopping when the
34 character
35 .I c
36 is found.
37 .PP
38 If the memory areas overlap, the results are undefined.
39 .SH RETURN VALUE
40 The
41 .BR memccpy ()
42 function returns a pointer to the next character
43 in
44 .IR dest
45 after
46 .IR c ,
47 or NULL if
48 .I c
49 was not found in the
50 first
51 .I n
52 characters of
53 .IR src .
54 .SH ATTRIBUTES
55 For an explanation of the terms used in this section, see
56 .BR attributes (7).
57 .ad l
58 .nh
59 .TS
60 allbox;
61 lbx lb lb
62 l l l.
63 Interface Attribute Value
64 T{
65 .BR memccpy ()
66 T} Thread safety MT-Safe
67 .TE
68 .hy
69 .ad
70 .sp 1
71 .SH CONFORMING TO
72 POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
73 .SH SEE ALSO
74 .BR bcopy (3),
75 .BR bstring (3),
76 .BR memcpy (3),
77 .BR memmove (3),
78 .BR strcpy (3),
79 .BR strncpy (3)