mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Events.
This commit is contained in:
@@ -74,6 +74,22 @@ std::string joinHumanReadable
|
||||
return result;
|
||||
}
|
||||
|
||||
/// Joins collection of strings just like joinHumanReadable, but prepends the separator
|
||||
/// unless the collection is empty.
|
||||
template<class T>
|
||||
std::string joinHumanReadablePrefixed
|
||||
(
|
||||
T const& _list,
|
||||
std::string const& _separator = ", ",
|
||||
std::string const& _lastSeparator = ""
|
||||
)
|
||||
{
|
||||
if (begin(_list) == end(_list))
|
||||
return {};
|
||||
else
|
||||
return _separator + joinHumanReadable(_list, _separator, _lastSeparator);
|
||||
}
|
||||
|
||||
/// Formats large numbers to be easily readable by humans.
|
||||
/// Returns decimal representation for smaller numbers; hex for large numbers.
|
||||
/// "Special" numbers, powers-of-two and powers-of-two minus 1, are returned in
|
||||
|
||||
Reference in New Issue
Block a user