MCPcopy Create free account
hub / github.com/ElementsProject/elements / IsHex

Function IsHex

src/util/strencodings.cpp:61–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61bool IsHex(const std::string& str)
62{
63 for(std::string::const_iterator it(str.begin()); it != str.end(); ++it)
64 {
65 if (HexDigit(*it) < 0)
66 return false;
67 }
68 return (str.size() > 0) && (str.size()%2 == 0);
69}
70
71bool IsHexNumber(const std::string& str)
72{

Callers 15

rest_getutxosFunction · 0.85
MutateTxAddOutDataFunction · 0.85
SetHexMethod · 0.85
GetAssetFromStringFunction · 0.85
UpdateFromArgsMethod · 0.85
CLiquidV1TestParamsMethod · 0.85
UpdateFromArgsMethod · 0.85
ParseScriptFunction · 0.85
DecodeHexTxFunction · 0.85
DecodeHexBlockHeaderFunction · 0.85
DecodeHexBlkFunction · 0.85
ParseHashStrFunction · 0.85

Calls 4

HexDigitFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by 3

BOOST_AUTO_TEST_CASEFunction · 0.68
FUZZ_TARGET_INITFunction · 0.68
CheckedParseHexFunction · 0.68