MCPcopy Create free account
hub / github.com/Artikash/Textractor / WideStringToString

Function WideStringToString

include/common.h:138–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138inline std::string WideStringToString(const std::wstring& text)
139{
140 std::vector<char> buffer((text.size() + 1) * 4);
141 WideCharToMultiByte(CP_UTF8, 0, text.c_str(), -1, buffer.data(), buffer.size(), nullptr, nullptr);
142 return buffer.data();
143}
144
145template <typename... Args>
146inline void TEXTRACTOR_MESSAGE(const wchar_t* format, const Args&... args) { MessageBoxW(NULL, FormatString(format, args...).c_str(), L"Textractor", MB_OK); }

Callers 5

TranslateFunction · 0.85
TranslateFunction · 0.85
EscapeFunction · 0.85
TranslateFunction · 0.85
ProcessSentenceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected