Closed incker closed 1 year ago
Code:
let num1 = BigDecimal::from_str("1.000").unwrap(); let num2 = BigDecimal::try_from(1.0f64).unwrap(); println!("{}", num1.to_string()); println!("{}", num2.to_string());
Output:
1.000 1.000000000000000
The question is how to make string from BigDecimal without trailing zeros Thank you
Yeah, you can call normalized()
Code:
Output:
The question is how to make string from BigDecimal without trailing zeros Thank you