MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / stringToUtf16

Function stringToUtf16

source/core/StarString_windows.cpp:26–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26unique_ptr<WCHAR[]> stringToUtf16(String const& s) {
27 int utf16Len = MultiByteToWideChar(CP_UTF8, 0, s.utf8Ptr(), s.utf8Size() + 1, NULL, 0);
28 unique_ptr<WCHAR[]> result;
29 result.reset(new WCHAR[utf16Len]);
30 MultiByteToWideChar(CP_UTF8, 0, s.utf8Ptr(), s.utf8Size() + 1, result.get(), utf16Len);
31 return result;
32}
33
34}

Callers 15

fatalErrorFunction · 0.85
fatalExceptionFunction · 0.85
loadLibraryMethod · 0.85
lockMethod · 0.85
changeDirectoryMethod · 0.85
makeDirectoryMethod · 0.85
existsMethod · 0.85
isFileMethod · 0.85
isDirectoryMethod · 0.85
fullPathMethod · 0.85
dirListMethod · 0.85
ephemeralFileMethod · 0.85

Calls 4

utf8PtrMethod · 0.45
utf8SizeMethod · 0.45
resetMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected