String(format:)
Also written: %.2f
A Foundation tool that builds a string from a number in a set layout; `String(format: "%.2f", total)` gives exactly two digits after the point, as for money.
Also written: %.2f
A Foundation tool that builds a string from a number in a set layout; `String(format: "%.2f", total)` gives exactly two digits after the point, as for money.