MCPcopy Create free account
hub / github.com/ZDoom/Raze / WideString

Function WideString

source/common/utility/utf8.cpp:1208–1220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1206}
1207
1208std::wstring WideString(const char* cin)
1209{
1210 std::wstring buildbuffer;
1211 if (cin)
1212 {
1213 // This is a bit tricky because we need to support both UTF-8 and legacy content in ISO-8859-1 / Windows 1252
1214 // and thanks to user-side string manipulation it can be that a text mixes both.
1215 // To convert the string this uses the same function as all text printing in the engine.
1216 const uint8_t* in = (const uint8_t*)cin;
1217 while (*in) buildbuffer.push_back((wchar_t)GetCharFromString(in));
1218 }
1219 return buildbuffer;
1220}
1221

Callers 15

FileReadableFunction · 0.85
DirEntryExistsFunction · 0.85
GetFileInfoFunction · 0.85
DoCreatePathFunction · 0.85
RemoveFileFunction · 0.85
RemoveDirFunction · 0.85
WideStringMethod · 0.85
I_DebugPrintFunction · 0.85
I_DebugPrintfFunction · 0.85
SetWindowTitleMethod · 0.85
I_ChDirFunction · 0.85
I_OpenShellFolderFunction · 0.85

Calls 2

GetCharFromStringFunction · 0.70
push_backMethod · 0.45

Tested by 2

M_GetConfigPathFunction · 0.68
M_GetNormalizedPathFunction · 0.68