ICU4X
International Components for Unicode
|
#include <Decimal.d.hpp>
Public Member Functions | |
uint8_t | digit_at (int16_t magnitude) const |
int16_t | magnitude_start () const |
int16_t | magnitude_end () const |
int16_t | nonzero_magnitude_start () const |
int16_t | nonzero_magnitude_end () const |
bool | is_zero () const |
void | multiply_pow10 (int16_t power) |
icu4x::DecimalSign | sign () const |
void | set_sign (icu4x::DecimalSign sign) |
void | apply_sign_display (icu4x::DecimalSignDisplay sign_display) |
void | trim_start () |
void | trim_end () |
void | trim_end_if_integer () |
void | pad_start (int16_t position) |
void | pad_end (int16_t position) |
void | set_max_position (int16_t position) |
void | round (int16_t position) |
void | ceil (int16_t position) |
void | expand (int16_t position) |
void | floor (int16_t position) |
void | trunc (int16_t position) |
void | round_with_mode (int16_t position, icu4x::DecimalSignedRoundingMode mode) |
void | round_with_mode_and_increment (int16_t position, icu4x::DecimalSignedRoundingMode mode, icu4x::DecimalRoundingIncrement increment) |
diplomat::result< std::monostate, std::monostate > | concatenate_end (icu4x::Decimal &other) |
std::string | to_string () const |
Static Public Member Functions | |
static std::unique_ptr< icu4x::Decimal > | from (int32_t v) |
static std::unique_ptr< icu4x::Decimal > | from (uint32_t v) |
static std::unique_ptr< icu4x::Decimal > | from (int64_t v) |
static std::unique_ptr< icu4x::Decimal > | from (uint64_t v) |
static diplomat::result< std::unique_ptr< icu4x::Decimal >, icu4x::DecimalLimitError > | from_double_with_integer_precision (double f) |
static diplomat::result< std::unique_ptr< icu4x::Decimal >, icu4x::DecimalLimitError > | from_double_with_lower_magnitude (double f, int16_t magnitude) |
static diplomat::result< std::unique_ptr< icu4x::Decimal >, icu4x::DecimalLimitError > | from_double_with_significant_digits (double f, uint8_t digits) |
static diplomat::result< std::unique_ptr< icu4x::Decimal >, icu4x::DecimalLimitError > | from_double_with_round_trip_precision (double f) |
static diplomat::result< std::unique_ptr< icu4x::Decimal >, icu4x::DecimalParseError > | from_string (std::string_view v) |
static void | operator delete (void *ptr) |
See the Rust documentation for Decimal
for more information.
|
inline |
See the Rust documentation for apply_sign_display
for more information.
|
inline |
See the Rust documentation for ceil
for more information.
|
inline |
Concatenates other
to the end of self
.
If successful, other
will be set to 0 and a successful status is returned.
If not successful, other
will be unchanged and an error is returned.
See the Rust documentation for concatenate_end
for more information.
|
inline |
See the Rust documentation for digit_at
for more information.
|
inline |
See the Rust documentation for expand
for more information.
|
inline |
See the Rust documentation for floor
for more information.
|
inlinestatic |
Construct an Decimal
from an integer.
See the Rust documentation for Decimal
for more information.
|
inlinestatic |
Construct an Decimal
from an integer.
See the Rust documentation for Decimal
for more information.
|
inlinestatic |
Construct an Decimal
from an integer.
See the Rust documentation for Decimal
for more information.
|
inlinestatic |
Construct an Decimal
from an integer.
See the Rust documentation for Decimal
for more information.
|
inlinestatic |
Construct an Decimal
from an integer-valued float
See the Rust documentation for try_from_f64
for more information.
See the Rust documentation for FloatPrecision
for more information.
|
inlinestatic |
Construct an Decimal
from an float, with a given power of 10 for the lower magnitude
See the Rust documentation for try_from_f64
for more information.
See the Rust documentation for FloatPrecision
for more information.
|
inlinestatic |
Construct an Decimal
from an float, with enough digits to recover the original floating point in IEEE 754 without needing trailing zeros
See the Rust documentation for try_from_f64
for more information.
See the Rust documentation for FloatPrecision
for more information.
|
inlinestatic |
Construct an Decimal
from an float, for a given number of significant digits
See the Rust documentation for try_from_f64
for more information.
See the Rust documentation for FloatPrecision
for more information.
|
inlinestatic |
Construct an Decimal
from a string.
See the Rust documentation for try_from_str
for more information.
|
inline |
See the Rust documentation for is_zero
for more information.
|
inline |
See the Rust documentation for magnitude_range
for more information.
|
inline |
See the Rust documentation for magnitude_range
for more information.
|
inline |
Multiply the Decimal
by a given power of ten.
See the Rust documentation for multiply_pow10
for more information.
|
inline |
See the Rust documentation for nonzero_magnitude_end
for more information.
|
inline |
See the Rust documentation for nonzero_magnitude_start
for more information.
|
inlinestatic |
|
inline |
Zero-pad the Decimal
on the right to a particular position
See the Rust documentation for pad_end
for more information.
|
inline |
Zero-pad the Decimal
on the left to a particular position
See the Rust documentation for pad_start
for more information.
|
inline |
Round the number at a particular digit position.
This uses half to even rounding, which resolves ties by selecting the nearest even integer to the original value.
See the Rust documentation for round
for more information.
|
inline |
See the Rust documentation for round_with_mode
for more information.
|
inline |
See the Rust documentation for round_with_mode_and_increment
for more information.
|
inline |
Truncate the Decimal
on the left to a particular position, deleting digits if necessary. This is useful for, e.g. abbreviating years ("2022" -> "22")
See the Rust documentation for set_max_position
for more information.
|
inline |
Set the sign of the Decimal
.
See the Rust documentation for set_sign
for more information.
|
inline |
See the Rust documentation for sign
for more information.
|
inline |
Format the Decimal
as a string.
See the Rust documentation for write_to
for more information.
|
inline |
See the Rust documentation for trim_end
for more information.
|
inline |
See the Rust documentation for trim_end_if_integer
for more information.
|
inline |
See the Rust documentation for trim_start
for more information.
|
inline |
See the Rust documentation for trunc
for more information.