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

Function StringToWideString

include/common.h:123–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121#pragma warning(pop)
122
123inline std::optional<std::wstring> StringToWideString(const std::string& text, UINT encoding)
124{
125 std::vector<wchar_t> buffer(text.size() + 1);
126 if (int length = MultiByteToWideChar(encoding, 0, text.c_str(), text.size() + 1, buffer.data(), buffer.size()))
127 return std::wstring(buffer.data(), length - 1);
128 return {};
129}
130
131inline std::wstring StringToWideString(const std::string& text)
132{

Callers 8

CreatePipeFunction · 0.85
GenerateHCodeFunction · 0.85
hookcode.cppFile · 0.85
TextThreadMethod · 0.85
PushMethod · 0.85
HttpRequestMethod · 0.85
UpdateDictionaryMethod · 0.85
ProcessSentenceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected