Appendix A: System Routines — Memory Management
867
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
memmove
Declaration:
void *
memmove
(void *
dest
, const void *
source
, size_t
length
)
Category(ies):
Memory Management
Description:
Copies
length
bytes from
source
to
dest
. Note that
memmove
, unlike
memcpy
, works properly even if some regions of
source
or
dest
overlap.
Inputs:
dest
— Destination of move.
source
— Source of move.
length
— Size of move in bytes.
Outputs:
dest
is returned.
Assumptions:
None
Side Effects:
None
Availability:
All versions of the TI-89 / TI-92 Plus.
TI-89 / TI-92 Plus
Differences:
None
See Also: strncpy, memcpy
Example:
char serno[11];
/* Assuming serno contains a 10 digit serial number, split it into two 5-digit
groups. Must use memmove since the two regions overlap
*/
memmove( &serno[6], &serno[5], 6 );
serno[5] = ' ';