The format!
macro allows us to create a string by defining a parameterized string with placeholders for where and how values should be placed (e.g. {}
).
format!
uses the same parameterized strings as println!
The capabilities of this function are too large of scope for Tour of Rust; check out the documentation here.