pub fn parse_suint(s: &str, decimals: u8) -> Result<SqlU256, UnitsError>
Expand description
Parses a decimal string (e.g. “1.23”) into a SqlU256, given the 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");