| 432 | } |
| 433 | |
| 434 | UTF16String 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 | |
| 458 | static const char gHexChar[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; |
| 459 | String Beefy::FileNameToURI(const StringImpl& fileName) |