MCPcopy Create free account
hub / github.com/Icinga/icinga2 / HexDecode

Function HexDecode

lib/base/utility.cpp:1550–1560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1548}
1549
1550static int HexDecode(char hc)
1551{
1552 if (hc >= '0' && hc <= '9')
1553 return hc - '0';
1554 else if (hc >= 'a' && hc <= 'f')
1555 return hc - 'a' + 10;
1556 else if (hc >= 'A' && hc <= 'F')
1557 return hc - 'A' + 10;
1558 else
1559 BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid hex character."));
1560}
1561
1562String Utility::EscapeString(const String& s, const String& chars, const bool illegal)
1563{

Callers 1

UnescapeStringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected