MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / IsHex

Function IsHex

src/commons/util/util.cpp:210–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208};
209
210bool IsHex(const string& str) {
211 for (char c : str) {
212 if (HexDigit(c) < 0) return false;
213 }
214 return (str.size() > 0) && (str.size() % 2 == 0);
215}
216
217vector<unsigned char> ParseHex(const char* psz) {
218 // convert hex dump to vector

Callers 3

BOOST_AUTO_TEST_CASEFunction · 0.85
ParseHashVFunction · 0.85
ParseHexVFunction · 0.85

Calls 2

HexDigitFunction · 0.85
sizeMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68