MCPcopy Create free account
hub / github.com/apache/thrift / byte_to_hex

Function byte_to_hex

lib/cpp/src/thrift/protocol/TDebugProtocol.cpp:30–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28using std::string;
29
30static string byte_to_hex(const uint8_t byte) {
31 char buf[3];
32 int ret = std::sprintf(buf, "%02x", (int)byte);
33 THRIFT_UNUSED_VARIABLE(ret);
34 assert(ret == 2);
35 assert(buf[2] == '\0');
36 return buf;
37}
38
39namespace apache {
40namespace thrift {

Callers 2

writeByteMethod · 0.85
writeStringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected