rust convert floating point number, to a string, with decimal digits. code example Example: rust convert floating point number, to a string, with decimal digits. let s = format!("{:.2}", x);