MCPcopy Create free account
hub / github.com/PixarAnimationStudios/OpenUSD / ArchWindowsUtf8ToUtf16

Function ArchWindowsUtf8ToUtf16

pxr/base/arch/fileSystem.cpp:1416–1429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1414}
1415
1416std::wstring ArchWindowsUtf8ToUtf16(const std::string &str)
1417{
1418 if (str.empty()) return std::wstring();
1419 // first call is only to get required size for wstring
1420 int size = MultiByteToWideChar(
1421 CP_UTF8, 0, str.data(), (int)str.size(), NULL, 0);
1422 if (size == 0) return std::wstring();
1423 std::wstring wstr(size, 0);
1424 if(MultiByteToWideChar(
1425 CP_UTF8, 0, str.data(), (int)str.size(), &wstr[0], size) == 0) {
1426 return std::wstring();
1427 }
1428 return wstr;
1429}
1430
1431#endif
1432

Callers 15

ArchOpenFileFunction · 0.85
ArchRmDirFunction · 0.85
ArchGetModificationTimeFunction · 0.85
ArchAbsPathFunction · 0.85
ArchGetFileLengthFunction · 0.85
ArchMakeTmpFileFunction · 0.85
ArchMakeTmpSubdirFunction · 0.85
ArchWindowsFileAccessFunction · 0.85
ArchFileAccessFunction · 0.85
ArchReadLinkFunction · 0.85
mainFunction · 0.85
Tf_HasAttributeFunction · 0.85

Calls 3

emptyMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by 1

mainFunction · 0.68