pub fn number_with_precision(value: impl Display, precision: usize) -> StringExpand description
Rounds to precision decimals: 3.14159 with 2 becomes 3.14 (Rails’ number_with_precision).
§Examples
assert_eq!(ocre::helpers::number_with_precision(2.46, 1), "2.5");