Skip to main content

format_length

Function format_length 

Source
pub fn format_length(
    value: f64,
    unit: &str,
    style: &str,
    places: u32,
    display_unit: Option<&str>,
    suppress_zero_inches: bool,
) -> Result<String, BindingError>
Expand description

Write value, a length in the unit named unit, as text. style is decimal (in display_unit, default unit, with places digits after the point), feet-inches (rounded to 1/places of an inch, 5' - 6 1/2"; with suppress_zero_inches, a whole foot is 5') or inches (66 1/2").

ยงErrors

See the module docs.