pub fn string_to_precision(a: &str, decimals: u32, mode: u8) -> Option<String>Expand description
Round to decimals decimal places using the specified rounding mode.
mode 0 = TRUNCATE, mode 2 = ROUND (half-up), mode 3 = ROUND_UP, mode 4 = ROUND_DOWN