MCPcopy Create free account
hub / github.com/Tencent/MMKV / string2MMKVPath_t

Function string2MMKVPath_t

Core/MemoryFile_Win32.cpp:678–685  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

676} // namespace mmkv
677
678std::wstring string2MMKVPath_t(const std::string &str) {
679 auto length = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, nullptr, 0);
680 auto buffer = new wchar_t[length];
681 MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, buffer, length);
682 wstring result(buffer);
683 delete[] buffer;
684 return result;
685}
686
687std::string MMKVPath_t2String(const MMKVPath_t &str) {
688 auto length = WideCharToMultiByte(CP_UTF8, 0, str.c_str(), -1, nullptr, 0, 0, 0);

Callers 14

mmkvInitializeFunction · 0.85
getMMKVWithIDFunction · 0.85
backupOneFunction · 0.85
restoreOneFunction · 0.85
backupAllFunction · 0.85
restoreAllFunction · 0.85
isFileValidFunction · 0.85
removeStorageFunction · 0.85
getNameSpaceFunction · 0.85
checkExistFunction · 0.85
testReadOnlyFunction · 0.85
encodeFilePathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected