| 53 | } |
| 54 | |
| 55 | ystring UnicodeReader::ReadHexDigit(std::function<bool(wchar32, size_t)> shouldStop) { |
| 56 | ystring result; |
| 57 | wchar32 ch = GetChar(); |
| 58 | while (!shouldStop(ch, result.size())) { |
| 59 | if (!IsHexDigit(ch)) { |
| 60 | Error("Pire::UnicodeReader::ReadHexDigit(): \"\\x...\" sequence contains non-valid hex number"); |
| 61 | } |
| 62 | result.push_back(ch); |
| 63 | ch = GetChar(); |
| 64 | } |
| 65 | UngetChar(ch); |
| 66 | return result; |
| 67 | } |
| 68 | |
| 69 | wchar32 UnicodeReader::HexToDec(const ystring &hexStr) { |
| 70 | wchar32 converted; |
nothing calls this directly
no test coverage detected