1*61193Sbostic.\" Copyright (c) 1990, 1991, 1993 2*61193Sbostic.\" The Regents of the University of California. All rights reserved. 341953Sbostic.\" 441953Sbostic.\" This code is derived from software contributed to Berkeley by 550310Sbostic.\" Chris Torek and the American National Standards Committee X3, 650310Sbostic.\" on Information Processing Systems. 750310Sbostic.\" 841953Sbostic.\" %sccs.include.redist.man% 941953Sbostic.\" 10*61193Sbostic.\" @(#)memcpy.3 8.1 (Berkeley) 06/04/93 1141953Sbostic.\" 1248351Scael.Dd 1348351Scael.Dt MEMCPY 3 1448351Scael.Os 1548351Scael.Sh NAME 1648351Scael.Nm memcpy 1748351Scael.Nd copy byte string 1848351Scael.Sh SYNOPSIS 1948351Scael.Fd #include <string.h> 2048351Scael.Ft void * 2148351Scael.Fn memcpy "void *dst" "const void *src" "size_t len" 2248351Scael.Sh DESCRIPTION 2348351ScaelThe 2448351Scael.Fn memcpy 2548351Scaelfunction 2641953Sbosticcopies 2748351Scael.Fa len 2841953Sbosticbytes from string 2948351Scael.Fa src 3041953Sbosticto string 3148351Scael.Fa dst . 3248351Scael.Sh RETURN VALUES 3348351ScaelThe 3448351Scael.Fn memcpy 3548351Scaelfunction 3648351Scaelreturns the original value of 3748351Scael.Fa dst . 3848351Scael.Sh SEE ALSO 3948351Scael.Xr bcopy 3 , 4048351Scael.Xr memccpy 3 , 4148351Scael.Xr memmove 3 , 4248351Scael.Xr strcpy 3 4348351Scael.Sh STANDARDS 4448351ScaelThe 4548351Scael.Fn memcpy 4648351Scaelfunction 4748351Scaelconforms to 4848351Scael.St -ansiC . 4948351Scael.Sh BUGS 5041953SbosticIn this implementation 5148351Scael.Fn memcpy 5241953Sbosticis implemented using 5348351Scael.Xr bcopy 3 , 5441953Sbosticand therefore the strings may overlap. 5541953SbosticOn other systems, copying overlapping strings may produce surprises. 5641953SbosticA simpler solution is to not use 5748351Scael.Fn memcpy . 58