String Formatting

    Source: https://doc.rust-lang.org/std/fmt/

    Precision πŸ”—

    Source: https://doc.rust-lang.org/std/fmt/#precision

    let x = 0.01;
    println!("Hello x is {x:.5}");
    

    Prints: β€œHello x is 0.01000”

    Fill/Alignment πŸ”—

    Source: https://doc.rust-lang.org/std/fmt/#fillalignment

    let hours = 3;
    println!("{hours:0>2}:25")
    

    Prints: β€œ03:25”

    Pretty Printing πŸ”—

    Source: https://doc.rust-lang.org/std/fmt/#sign0

    β€˜#?’ - pretty-print the Debug formatting (adds line breaks and indentation)

    format!("{:#?}", (100, 200));     // => "(
                                      //       100,
                                      //       200,
                                      //     )"