util: remove unused IsHexNumber

The relevant unit tests have been incorporated in
uint256_tests/from_user_hex in a previous commit.
This commit is contained in:
stickies-v
2024-08-20 14:59:28 +01:00
parent 8a44d7d3c1
commit 2e58fdb544
4 changed files with 0 additions and 40 deletions

View File

@@ -46,16 +46,6 @@ bool IsHex(std::string_view str)
return (str.size() > 0) && (str.size()%2 == 0);
}
bool IsHexNumber(std::string_view str)
{
if (str.substr(0, 2) == "0x") str.remove_prefix(2);
for (char c : str) {
if (HexDigit(c) < 0) return false;
}
// Return false for empty string or "0x".
return str.size() > 0;
}
template <typename Byte>
std::optional<std::vector<Byte>> TryParseHex(std::string_view str)
{