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

Function String2Byte

util/string/hex.h:25–27  ·  view source on GitHub ↗

Convert a hex string of exactly 2 chars to int ! @example String2Byte("10") => 16 */

Source from the content-addressed store, hash-verified

23//! Convert a hex string of exactly 2 chars to int
24/*! @example String2Byte("10") => 16 */
25inline static int String2Byte(const char* s) {
26 return Char2Digit(*s) * 16 + Char2Digit(*(s + 1));
27}
28
29char* HexEncode(const void* in, size_t len, char* out);
30

Callers 1

HexDecodeFunction · 0.85

Calls 1

Char2DigitFunction · 0.85

Tested by

no test coverage detected