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

Function to_string

src/common/Utility.cpp:47–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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));
49 if (bytes.empty())
50 return {};
51 return bytes.data();
52}
53
54std::string to_utf8_string(std::string_view source) {
55 auto bytes = convert("CHAR", "UTF-8//IGNORE", source.data(), source.length(), max_utf8_char_length * (source.length() + 1));

Callers 10

throw_if_errorFunction · 0.70
to_editor_encodingMethod · 0.50
update_file_listMethod · 0.50
create_hunspellMethod · 0.50
ComExceptionMethod · 0.50
setup_aspell_configMethod · 0.50
set_languageMethod · 0.50
process_replaceMethod · 0.50

Calls 3

dataMethod · 0.80
convertFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected