Copies the wide character ch into each of the first count wide characters of the wide character array pointed to by dest.
If overflow occurs, the behavior is undefined.
If count is zero, the function does nothing.
[edit] Parameters dest - pointer to the wide character array to fill ch - fill wide character count - number of wide characters to fill [edit] Return valueReturns a copy of dest.
[edit] NotesThis function is not locale-sensitive and pays no attention to the values of the wchar_t objects it writes: nulls as well as invalid wide characters are written too.
[edit] Example#include <clocale> #include <cwchar> #include <iostream> #include <locale> int main() { wchar_t ar[4] = {L'1', L'2', L'3', L'4'}; std::wmemset(ar, L'\U0001f34c', 2); // replaces [12] with the ð bananas std::wmemset(ar + 2, L'è', 2); // replaces [34] with the è bananas std::setlocale(LC_ALL, "en_US.utf8"); std::wcout.imbue(std::locale("en_US.utf8")); std::wcout << std::wstring(ar, 4) << '\n'; }
Possible output:
[edit] See also fills a buffer with a characterRetroSearch 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