MCPcopy Create free account
hub / github.com/apple/foundationdb / hexValue

Function hexValue

flow/TLSConfig.actor.cpp:381–392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379}
380
381static int hexValue(char c) {
382 static char const digits[] = "0123456789ABCDEF";
383
384 if (c >= 'a' && c <= 'f')
385 c -= ('a' - 'A');
386
387 int value = std::find(digits, digits + 16, c) - digits;
388 if (value >= 16) {
389 throw std::runtime_error("hexValue");
390 }
391 return value;
392}
393
394// Does not handle "raw" form (e.g. #28C4D1), only escaped text
395static std::string de4514(std::string const& input, int start, int& out_end) {

Callers 1

de4514Function · 0.70

Calls 1

findFunction · 0.85

Tested by

no test coverage detected