copy a number of characters from one buffer to another
#include <string.h> void *memmove( void *dst, const void *src, size_t length ); void __far *_fmemmove( void __far *dst, const void __far *src, size_t length );
The memmove() function copies length characters from the buffer pointed to by src to the buffer pointed to by dst. Copying of overlapping objects will take place properly. See the memcpy() function to copy objects that don't overlap.
The _fmemmove() function is a data-model-independent form of the memmove() function. It accepts far pointer arguments, and returns a far pointer. It is most useful in mixed memory model applications.
A pointer to the destination buffer (that is, the value of dst).
#include <stdio.h> #include <string.h> void main() { char buffer[80]; strcpy( buffer, "World"); memmove( buffer+1, buffer, 79 ); printf ("%s\n", buffer); }
produces the output:
WWorld
memmove() is ANSI; _fmemmove() is WATCOM.
Safety: | |
---|---|
Interrupt handler | Yes |
Signal handler | Yes |
Thread | Yes |
memchr(), memcmp(), memcpy(), memicmp(), memset()