mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Helpers.
This commit is contained in:
parent
77b26552b1
commit
bda410bb07
@ -145,6 +145,13 @@ inline std::string toHex(u256 val, HexPrefix prefix = HexPrefix::DontAdd)
|
||||
return (prefix == HexPrefix::Add) ? "0x" + str : str;
|
||||
}
|
||||
|
||||
inline std::string toCompactHexWithPrefix(u256 val)
|
||||
{
|
||||
std::ostringstream ret;
|
||||
ret << std::hex << val;
|
||||
return "0x" + ret.str();
|
||||
}
|
||||
|
||||
// Algorithms for string and string-like collections.
|
||||
|
||||
/// Escapes a string into the C-string representation.
|
||||
|
@ -90,7 +90,7 @@ string Whiskers::replace(
|
||||
string tagName(_match[1]);
|
||||
if (!tagName.empty())
|
||||
{
|
||||
assertThrow(_parameters.count(tagName), WhiskersError, "Tag " + tagName + " not found.");
|
||||
assertThrow(_parameters.count(tagName), WhiskersError, "Value for tag " + tagName + " not provided.");
|
||||
return _parameters.at(tagName);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user