1#include <xrpl/basics/strHex.h>
2#include <xrpl/beast/utility/Zero.h>
3#include <xrpl/protocol/SystemParameters.h>
4#include <xrpl/protocol/UintTypes.h>
21 "abcdefghijklmnopqrstuvwxyz"
22 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
37 if (currency == beast::zero)
43 static constexpr Currency sIsoBits(
"FFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFF");
45 if ((currency & sIsoBits).isZero())
66 currency = beast::zero;
76 currency = beast::zero;
98 static Currency const currency(beast::zero);
112 static Currency const currency(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::string_view isoCharSet
constexpr std::size_t isoCodeLength
constexpr std::size_t isoCodeOffset
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
base_uint< 160, detail::CurrencyTag > Currency
Currency is a hash representing a specific currency.
std::string to_string(base_uint< Bits, Tag > const &a)
std::string strHex(FwdIt begin, FwdIt end)
Currency const & xrpCurrency()
XRP currency.
Currency const & noCurrency()
A placeholder for empty currencies.
static std::string const & systemCurrencyCode()
bool to_currency(Currency &, std::string const &)
Tries to convert a string to a Currency, returns true on success.
Currency const & badCurrency()
We deliberately disallow the currency that looks like "XRP" because too many people were using it ins...