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

Function GetDigit

util/generic/guid.cpp:76–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76static bool GetDigit(const char c, ui32& digit) {
77 digit = 0;
78 if ('0' <= c && c <= '9') {
79 digit = c - '0';
80 } else if ('a' <= c && c <= 'f') {
81 digit = c - 'a' + 10;
82 } else if ('A' <= c && c <= 'F') {
83 digit = c - 'A' + 10;
84 } else {
85 return false; // non-hex character
86 }
87 return true;
88}
89
90bool GetGuid(const TStringBuf s, TGUID& result) {
91 size_t partId = 0;

Callers 2

GetGuidFunction · 0.85
GetUuidFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected