Name
memmove - copies memory area
Library
libc.lib
Synopsis
|
void *
memmove (void *dst, const void *src, size_t len);
|
Detailed description
The
memmove
function
copies
len
bytes from string
src
to string
dst.
The two strings may overlap;
the copy is always done in a non-destructive manner.
Examples
#include <string.h>
#include <stdio.h>
int main()
{
char one[50];
(void) strcpy(one, "abcdefgh");
printf("String before memmove %s\n",one);
(void) memmove(one+1, "xyz", 2);
printf("String after memmove %s\n",one);
(void) strcpy(one, "abcdefgh");
printf("String before memmove %s\n",one);
(void) memmove(one+1, "xyz", 0);
printf("String after memmove %s\n",one);
return 0;
}
Output
String before memmove abcdefgh
String after memmove axydefgh
String before memmove abcdefgh
String after memmove abcdefgh
Return value
The
memmove
function returns pointer to dst
dst.
See also
bcopy,
memcpy,
strcpy
Feedback
For additional information or queries on this page send feedback
© 2005-2007 Nokia
|
|