MCPcopy Create free account
hub / github.com/beefytech/Beef / UTF16Decode

Method UTF16Decode

BeefySysLib/Common.cpp:434–456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

432}
433
434UTF16String Beefy::UTF16Decode(const uint16* theString)
435{
436 if (sizeof(wchar_t) == 2)
437 {
438 UTF16String str;
439 str.Set((wchar_t*)theString);
440 return str;
441 }
442 else
443 {
444 UTF16String str;
445
446 int len = 0;
447 while (theString[len] != 0)
448 len++;
449
450 str.ResizeRaw(len + 1);
451 str[len] = 0;
452 for (int pos = 0; pos < len; pos++)
453 str[pos] = (wchar_t)theString[pos];
454 return str;
455 }
456}
457
458static const char gHexChar[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
459String Beefy::FileNameToURI(const StringImpl& fileName)

Callers

nothing calls this directly

Calls 2

SetMethod · 0.45
ResizeRawMethod · 0.45

Tested by

no test coverage detected