std::wmemmove

Header: <cwchar>

Copies exactly count successive wide characters from the wide character array pointed to by src to the wide character array pointed to by dest.

# Declarations

wchar_t* wmemmove( wchar_t* dest, const wchar_t* src, std::size_t count );

# Parameters

# Return value

Returns a copy of dest.

# Notes

This function is not locale-sensitive and pays no attention to the values of the wchar_t objects it copies: nulls as well as invalid characters are copied too.

# Example

#include <clocale>
#include <cwchar>
#include <iostream>
#include <locale>
 
int main()
{
    std::setlocale(LC_ALL, "en_US.utf8");
    std::wcout.imbue(std::locale("en_US.utf8"));
 
    wchar_t str[] = L"αβγδεζηθικλμνξοπρστυφχψω";
    std::wcout << str << '\n';
    std::wmemmove(str + 4, str + 3, 3); // copy from [δεζ] to [εζη]
    std::wcout << str << '\n';
}

# See also