A pointer to a wide-character string, where each element is of type `wchar_t`. Used for representing text in wide-character encoding to support extended character sets.
A pointer to a wide-character string, where each element is of type `wchar_t`. Used for representing text in wide-character encoding to support extended character sets.
1st Parameter
Pointer to the destination wide-character array where the content is to be moved.
2nd Parameter Type : const wchar_t *
A pointer to a read-only wide-character string, where each character is of type `wchar_t`. Used for representing text in wide-character encoding to support extended character sets, such as Unicode. The string is null-terminated, with the terminator being a `wchar_t` with value 0.
2nd Parameter
Pointer to the source wide-character array to move from.
3rd Parameter Type : size_t
Platform-specific unsigned type for array indices and memory sizes.
3rd Parameter
The number of wide characters to move from `src` to `dest`.
Read more about parameters of wmemmove in parameters section
The wmemmovefunction in C language Moves 'n' wide characters from one wide character array to another, handling overlapping memory correctly.
wmemmove copies n wide characters from the object pointed to by src to the object pointed to by dest. The copying takes place as if the n wide characters from src are first copied into a temporary array that does not overlap src or dest, and then the n wide characters from the temporary array are copied to dest. This ensures correct behavior even when the source and destination regions overlap.
The wmemmovefunction takes 3
parameters:
•
wchar_t * `dest`: Pointer to the destination wide-character array where the content is to be moved.
•
const wchar_t * `src`: Pointer to the source wide-character array to move from.
•
size_t `n`: The number of wide characters to move from `src` to `dest`.
Moves `n` wide characters from the wide-character array `src` to `dest`. The arrays may overlap. Returns a pointer to `dest`.
The wmemmove function return value :
Returns the value of dest
Output
This example demonstrates the basic usage of wmemmove to move a portion of a string within itself.