Skip to main content

format_currency

Function format_currency 

Source
pub fn format_currency<T: Showable + Any>(value: &T) -> String
Expand description

A currency hole ({x:$}), rendered exactly as the interpreter’s apply_format_spec: an integer or a float as money with two decimals, an exact integer beyond i64 with an exact .00, and every other value — an exact decimal keeps its own digits — as $ before its own display.