errno_t wmemmove_s( wchar_t *dest, rsize_t destsz,
const wchar_t *src, rsize_t count);
1) Copies exactly count successive wide characters from the wide character array pointed to by src to the wide character array pointed to by dest. If count is zero, the function does nothing. The arrays may overlap: copying takes place as if the wide characters were copied to a temporary wide character array and then copied from the temporary array to dest.
2)Same as
(1), except that the following errors are detected at runtime and call the currently installed
constraint handlerfunction:
wmemcpy_s
is only guaranteed to be available if __STDC_LIB_EXT1__ is defined by the implementation and if the user defines __STDC_WANT_LIB_EXT1__ to the integer constant 1 before including <wchar.h>.
1) Returns a copy of dest
2) Returns zero on success, returns non-zero on error. Also, on error, fills the entire dst up to and not including dst+dstsz with null wide characters, L'\0' (unless dest is null or destsz is greater than RSIZE_MAX/sizeof(wchar_t))
[edit] NotesThis 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.
[edit] Example#include <locale.h> #include <stdio.h> #include <wchar.h> int main(void) { setlocale(LC_ALL, "en_US.utf8"); wchar_t str[] = L"αβγδεζηθικλμνξοÏÏÏÏÏ ÏÏÏÏ"; printf("%ls\n", str); wmemmove(str + 4, str + 3, 3); // copy from [δεζ] to [εζη] printf("%ls\n", str); }
Output:
αβγδεζηθικλμνξοÏÏÏÏÏ ÏÏÏÏ Î±Î²Î³Î´Î´ÎµÎ¶Î¸Î¹ÎºÎ»Î¼Î½Î¾Î¿ÏÏÏÏÏ ÏÏÏÏ[edit] References
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4