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

Function x2c

library/cpp/string_utils/url/url.cpp:392–396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390#define X(c) (c >= 'A' ? ((c & 0xdf) - 'A') + 10 : (c - '0'))
391
392static inline int x2c(unsigned char* x) {
393 if (!IsAsciiHex(x[0]) || !IsAsciiHex(x[1]))
394 return -1;
395 return X(x[0]) * 16 + X(x[1]);
396}
397
398#undef X
399

Callers 3

x2cMethod · 0.85
UrlUnescapeFunction · 0.85
UnescapeFunction · 0.85

Calls 2

IsAsciiHexFunction · 0.85
XClass · 0.50

Tested by

no test coverage detected