6.23.61 wmemmove Function
Copy wide characters to an object, handling overlap of source and destination objects.
Include
<wchar.h>
Prototype
wchar_t * wmemmove( wchar_t * restrict s1, const wchar_t * restrict s2,
size_t n);
Arguments
s1- the object to hold the copied wide characters
s2- the object from which wide characters are copied
n- the number of wide characters to copy
Return Value
A copy of s1.
Remarks
The function copies n wide characters from the object pointed to by
s2 into the object pointed to by s1. The memory used by
the n wide characters in the destination location may overlap with that of
the n wide characters in the source object.
Example
#include <wchar.h>
int main(void)
{
wchar_t ws[40] = L"A string to be sure";
wmemmove(&ws[9], &ws[11], 11);
wprintf(L"the wide string is \"%ls\"\n", ws);
}
Example Output
the wide string is "A string to be sure"
