1#include <test/jtx/Account.h>
2#include <test/jtx/amount.h>
4#include <xrpl/basics/safe_cast.h>
15 AnyAmount
const& amount)
19 os << amount.value.getText() <<
"/" <<
20 to_string(amount.value.issue().currency) <<
24 os << amount.value.getText() <<
"/" <<
25 to_string(amount.value.issue().currency) <<
26 "(" << amount.name() <<
")";
46 out.erase(
out.find_last_not_of(
'0') + 1, std::string::npos);
47 if (
out.back() ==
'.')
64 os <<
"-" << n <<
" drops";
85 << amount.
name() <<
")";
constexpr TIss const & get() const
A currency issued by an account.
constexpr bool holds() const noexcept
Asset const & asset() const
std::string getText() const override
bool negative() const noexcept
Issue const & issue() const
std::uint64_t mantissa() const noexcept
bool native() const noexcept
constexpr value_type drops() const
Returns the number of drops.
std::string const & name() const
Return the name.
Converts to IOU Issue or STAmount.
PrettyAmount operator()(T v) const
std::ostream & operator<<(std::ostream &os, PrettyAmount const &amount)
constexpr XRPAmount dropsPerXRP
any_t const any
Returns an amount representing "any issuer".
static std::string to_places(T const d, std::uint8_t places)
XRP_t const XRP
Converts to XRP Issue or STAmount.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::string to_string(base_uint< Bits, Tag > const &a)
T setprecision(T... args)
Amount specifier with an option for any issuer.
Represents an XRP or IOU quantity This customizes the string conversion and supports XRP conversions ...
STAmount const & value() const
std::string const & name() const