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

Method to_editor_encoding

src/npp/EditorInterface.cpp:52–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52std::string EditorInterface::to_editor_encoding(std::wstring_view str) const {
53 switch (get_encoding()) {
54 case EditorCodepage::ansi:
55 return to_string(str);
56 case EditorCodepage::utf8:
57 return to_utf8_string(str);
58 case EditorCodepage::COUNT:
59 break;
60 }
61 throw std::runtime_error("Unsupported encoding");
62}
63
64MappedWstring EditorInterface::to_mapped_wstring(const std::string &str) {
65 if (get_encoding() == EditorCodepage::utf8)

Calls 2

to_utf8_stringFunction · 0.85
to_stringFunction · 0.50

Tested by

no test coverage detected