MCPcopy Create free account
hub / github.com/catboost/catboost / ReadHexDigit

Method ReadHexDigit

library/cpp/regex/pire/pire/read_unicode.cpp:55–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;

Callers

nothing calls this directly

Calls 4

IsHexDigitFunction · 0.50
ErrorClass · 0.50
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected