1#include <test/jtx/Account.h>
2#include <test/jtx/amount.h>
4#include <xrpl/basics/safe_cast.h>
19 os <<
amount.value.getText() <<
"/" <<
24 os <<
amount.value.getText() <<
"/" <<
26 "(" <<
amount.name() <<
")";
46 out.erase(
out.find_last_not_of(
'0') + 1, std::string::npos);
47 if (
out.back() ==
'.')
56 if (
amount.value().native())
60 auto const n =
amount.value().mantissa();
63 if (
amount.value().negative())
64 os <<
"-" << n <<
" drops";
70 if (
amount.value().negative())
77 os <<
amount.value().getText() <<
"/"
A currency issued by an account.
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
any_t const any
Returns an amount representing "any issuer".
static std::string to_places(T const d, std::uint8_t places)
std::ostream & operator<<(std::ostream &os, PrettyAmount const &amount)
XRP_t const XRP
Converts to XRP Issue or STAmount.
constexpr XRPAmount dropsPerXRP
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 ...