MCPcopy Create free account
hub / github.com/Predelnik/DSpellCheck / to_wstring

Function to_wstring

src/common/Utility.cpp:40–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40std::wstring to_wstring(std::string_view source) {
41 auto bytes = convert("CHAR", "UCS-2LE//IGNORE", source.data(), source.length(), sizeof(wchar_t) * (source.length() + 1));
42 if (bytes.empty())
43 return {};
44 return reinterpret_cast<wchar_t *>(bytes.data());
45}
46
47std::string to_string(std::wstring_view source) {
48 auto bytes = convert("UCS-2LE", "CHAR//IGNORE", source.data(), (source.length()) * sizeof(wchar_t), sizeof(wchar_t) * (source.length() + 1));

Callers 15

non_ansi_tokenizerMethod · 0.85
print_to_logFunction · 0.85
to_mapped_wstringFunction · 0.85
update_file_listMethod · 0.85
create_global_handleMethod · 0.85
get_language_listMethod · 0.85
send_aspell_errorMethod · 0.85
add_to_dictionaryMethod · 0.85
run_dlg_procMethod · 0.85
set_recheck_delayMethod · 0.85

Calls 3

dataMethod · 0.80
convertFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected