Skip to main content

format_int_padded

Function format_int_padded 

Source
fn format_int_padded(
    output: &mut (impl Write + ?Sized),
    value: u64,
    width: u8,
) -> Result<usize>
Available on crate feature formatting only.
Expand description

Write an integer with zeros as trailing padding if necessary to reach the requested width.

This function is intended to be used for formatting the fractional part of a value, as the trailing zeros would change the semantic meaning for non-fractional values.