1#include <xrpl/protocol/UintTypes.h>
3#include <xrpl/basics/strHex.h>
4#include <xrpl/beast/utility/Zero.h>
5#include <xrpl/protocol/SystemParameters.h>
22 "abcdefghijklmnopqrstuvwxyz"
23 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
38 if (currency == beast::kZero)
44 static constexpr Currency kSIsoBits(
"FFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFF");
46 if ((currency & kSIsoBits).isZero())
69 currency = beast::kZero;
79 currency = beast::kZero;
101 static Currency const kCurrency(beast::kZero);
115 static Currency const kCurrency(0x5852500000000000);
constexpr bool parseHex(std::string_view sv)
Parse a hex string into a base_uint.
T find_first_not_of(T... args)
constexpr std::size_t kIsoCodeLength
constexpr std::size_t kIsoCodeOffset
constexpr std::string_view kIsoCharSet
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::string strHex(FwdIt begin, FwdIt end)
BaseUInt< 160, detail::CurrencyTag > Currency
Currency is a hash representing a specific currency.
bool toCurrency(Currency &, std::string const &)
Tries to convert a string to a Currency, returns true on success.
Currency const & xrpCurrency()
XRP currency.
std::string to_string(BaseUInt< Bits, Tag > const &a)
Currency const & noCurrency()
A placeholder for empty currencies.
static std::string const & systemCurrencyCode()
Currency const & badCurrency()
We deliberately disallow the currency that looks like "XRP" because too many people were using it ins...