

memmove()                String Function                memmove()




Copy region of memory into area it overlaps

#include <string.h>
cchhaarr *mmeemmmmoovvee(_r_e_g_i_o_n_1, _r_e_g_i_o_n_2, _c_o_u_n_t);
cchhaarr *_r_e_g_i_o_n_1, cchhaarr *_r_e_g_i_o_n_2, uunnssiiggnneedd iinntt _c_o_u_n_t;

memmove  copies  count  characters  from  region2  into  region1.
Unlike memcpy, memmove  correctly copies the region pointed to by
region2 into  that pointed by  region1 even if  they overlap.  To
``correctly copy'' means that the overlap does not propagate, not
that  the  moved data  stay  intact.   Unlike the  string-copying
routines strcpy and strncpy, memmove continues to copy even if it
encounters a null character.

memmove returns region1.

***** See Also *****

string functions, string.h

***** Notes *****

region1 should  point to enough reserved memory  to hold the con-
tents of region2.  Otherwise, code or data will be overwritten.
































COHERENT Lexicon                                           Page 1


