MCPcopy Create free account
hub / github.com/baidu/tera / ToBinary

Function ToBinary

src/utils/string_util.cc:33–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33char ToBinary(uint8_t i) {
34 char j = 0;
35 if (i >= '0' && i <= '9') {
36 j = i - '0';
37 } else if (i >= 'a' && i <= 'f') {
38 j = i - 'a' + 10;
39 } else {
40 j = i - 'A' + 10;
41 }
42 return j;
43}
44
45std::string DebugString(const std::string& src) {
46 size_t src_len = src.size();

Callers 1

ParseDebugStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected