Function core::num::flt2dec::digits_to_exp_str
source · fn digits_to_exp_str<'a>(
buf: &'a [u8],
exp: i16,
min_ndigits: usize,
upper: bool,
parts: &'a mut [MaybeUninit<Part<'a>>]
) -> &'a [Part<'a>]🔬This is a nightly-only experimental API. (
flt2dec)Expand description
Formats the given decimal digits 0.<...buf...> * 10^exp into the exponential
form with at least the given number of significant digits. When upper is true,
the exponent will be prefixed by E; otherwise that’s e. The result is
stored to the supplied parts array and a slice of written parts is returned.
min_digits can be less than the number of actual significant digits in buf;
it will be ignored and full digits will be printed. It is only used to print
additional zeroes after rendered digits. Thus, min_digits == 0 means that
it will only print the given digits and nothing else.