format_suint

Function format_suint 

Source
pub fn format_suint(value: SqlU256, decimals: u8) -> Result<String, UnitsError>
Expand description

Formats a SqlU256 as a decimal string with the given number of decimals.

ยงExamples

use ethereum_mysql::utils::{parse_suint, format_suint};
let v = parse_suint("1.23", 6).unwrap();
assert_eq!(format_suint(v, 6).unwrap(), "1.230000");