Commit | Line | Data |
---|---|---|
ae59e04c | 1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
7de823bd KB |
2 | .\" All rights reserved. |
3 | .\" | |
4 | .\" This code is derived from software contributed to Berkeley by | |
043368e6 KB |
5 | .\" Chris Torek and the American National Standards Committee X3, |
6 | .\" on Information Processing Systems. | |
7 | .\" | |
7de823bd KB |
8 | .\" %sccs.include.redist.man% |
9 | .\" | |
043368e6 | 10 | .\" @(#)memcpy.3 5.5 (Berkeley) %G% |
7de823bd | 11 | .\" |
ae59e04c CL |
12 | .Dd |
13 | .Dt MEMCPY 3 | |
14 | .Os | |
15 | .Sh NAME | |
16 | .Nm memcpy | |
17 | .Nd copy byte string | |
18 | .Sh SYNOPSIS | |
19 | .Fd #include <string.h> | |
20 | .Ft void * | |
21 | .Fn memcpy "void *dst" "const void *src" "size_t len" | |
22 | .Sh DESCRIPTION | |
23 | The | |
24 | .Fn memcpy | |
25 | function | |
7de823bd | 26 | copies |
ae59e04c | 27 | .Fa len |
7de823bd | 28 | bytes from string |
ae59e04c | 29 | .Fa src |
7de823bd | 30 | to string |
ae59e04c CL |
31 | .Fa dst . |
32 | .Sh RETURN VALUES | |
33 | The | |
34 | .Fn memcpy | |
35 | function | |
36 | returns the original value of | |
37 | .Fa dst . | |
38 | .Sh SEE ALSO | |
39 | .Xr bcopy 3 , | |
40 | .Xr memccpy 3 , | |
41 | .Xr memmove 3 , | |
42 | .Xr strcpy 3 | |
43 | .Sh STANDARDS | |
44 | The | |
45 | .Fn memcpy | |
46 | function | |
47 | conforms to | |
48 | .St -ansiC . | |
49 | .Sh BUGS | |
7de823bd | 50 | In this implementation |
ae59e04c | 51 | .Fn memcpy |
7de823bd | 52 | is implemented using |
ae59e04c | 53 | .Xr bcopy 3 , |
7de823bd KB |
54 | and therefore the strings may overlap. |
55 | On other systems, copying overlapping strings may produce surprises. | |
56 | A simpler solution is to not use | |
ae59e04c | 57 | .Fn memcpy . |