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

Function Char2Digit

util/string/hex.h:17–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15extern const char* const Char2DigitTable;
16
17inline static int Char2Digit(char ch) {
18 char result = Char2DigitTable[(unsigned char)ch];
19 Y_ENSURE(result != '\xff', "invalid hex character " << (int)ch);
20 return result;
21}
22
23//! Convert a hex string of exactly 2 chars to int
24/*! @example String2Byte("10") => 16 */

Callers 1

String2ByteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected