23 static_assert(
COIN > 1);
34 for (
int i = str.size()-1; (str[i] ==
'0' &&
IsDigit(str[i-2])); --i)
57 const char*
p = str.c_str();
bool MoneyRange(const CAmount &nValue)
int64_t CAmount
Amount in satoshis (Can be negative)
static constexpr CAmount COIN
The amount of satoshis in one BTC.
std::optional< CAmount > ParseMoney(const std::string &money_string)
Parse an amount denoted in full coins.
std::string FormatMoney(const CAmount n)
Money parsing/formatting utilities.
std::string TrimString(std::string_view str, std::string_view pattern=" \f\n\r\t\v")
bool ContainsNoNUL(std::string_view str) noexcept
Check if a string does not contain any embedded NUL (\0) characters.
constexpr bool IsDigit(char c)
Tests if the given character is a decimal digit.
constexpr bool IsSpace(char c) noexcept
Tests if the given character is a whitespace character.
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.