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

Function utf8_to_string

src/common/Utility.cpp:75–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75std::string utf8_to_string(const char *source) {
76 auto bytes = convert("UTF-8", "CHAR//IGNORE", source, strlen(source), utf8_length(source) + 1);
77 if (bytes.empty())
78 return {};
79 return bytes.data();
80}
81
82// This function is more or less transferred from gcc source
83bool match_special_char(wchar_t *dest, const wchar_t *&source) {

Callers

nothing calls this directly

Calls 4

utf8_lengthFunction · 0.85
dataMethod · 0.80
convertFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected