MCPcopy Create free account
hub / github.com/apache/brpc / hex_to_int

Function hex_to_int

src/brpc/grpc.cpp:143–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143static int hex_to_int(char c) {
144 if (c >= 'a' && c <= 'f') {
145 return c - 'a' + 10;
146 } else if (c >= 'A' && c <= 'F') {
147 return c - 'A' + 10;
148 } else if (c >= '0' && c <= '9') {
149 return c - '0';
150 }
151 return 0;
152}
153
154void PercentDecode(const std::string& str, std::string* str_out) {
155 std::ostringstream unescaped;

Callers 1

PercentDecodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected