20 #include <ripple/basics/safe_cast.h>
24 #include <test/jtx/Account.h>
25 #include <test/jtx/amount.h>
34 AnyAmount
const& amount)
38 os << amount.value.getText() <<
"/" <<
39 to_string(amount.value.issue().currency) <<
43 os << amount.value.getText() <<
"/" <<
44 to_string(amount.value.issue().currency) <<
45 "(" << amount.name() <<
")";
65 out.erase(
out.find_last_not_of(
'0') + 1, std::string::npos);
66 if (
out.back() ==
'.')
83 os <<
"-" << n <<
" drops";
std::string const & name() const
Return the name.
T setprecision(T... args)
const XRP_t XRP
Converts to XRP Issue or STAmount.
constexpr XRPAmount dropsPerXRP
std::ostream & operator<<(std::ostream &os, PrettyAmount const &amount)
static std::string to_places(const T d, std::uint8_t places)
Issue const & issue() const
std::uint64_t mantissa() const noexcept
constexpr value_type drops() const
Returns the number of drops.
std::string getText() const override
Amount specifier with an option for any issuer.
PrettyAmount operator()(T v) const
const any_t any
Returns an amount representing "any issuer".
bool native() const noexcept
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::string const & name() const
Converts to IOU Issue or STAmount.
bool negative() const noexcept
STAmount const & value() const
std::string to_string(Manifest const &m)
Format the specified manifest to a string for debugging purposes.
Represents an XRP or IOU quantity This customizes the string conversion and supports XRP conversions ...