decimalFixedPointToString
Returns the canonical decimal string representation of a DecimalFixedPoint.
By default, trailing zeros are trimmed and the decimal point is
dropped for whole numbers. Pass options.decimals to emit a different
number of fractional digits (with RoundingMode control when
scale-down is lossy), and options.padTrailingZeros to emit exactly
that many digits. When padTrailingZeros is set without decimals,
the output is padded to value.decimals.
Throws SOLANA_ERROR__FIXED_POINTS__STRICT_MODE_PRECISION_LOSS when
options.decimals forces a lossy rescale under the default 'strict'
rounding mode.
Parameters
| Parameter | Type |
|---|---|
value | DecimalFixedPoint<Signedness, number, number> |
options? | FixedPointToStringOptions |
Returns
string