Function core::num::flt2dec::digits_to_exp_str
[−]
[src]
fn digits_to_exp_str<'a>(buf: &'a [u8], exp: i16, min_ndigits: usize, upper: bool, parts: &'a mut [Part<'a>]) -> &'a [Part<'a>]
Unstable (
flt2dec
): internal routines only exposed for testing
Formats given decimal digits 0.<...buf...> * 10^exp
into the exponential form
with at least 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
of 0 means that
it will only print given digits and nothing else.