std::format!
[−]
( $ ( $ arg : tt ) * ) => ( $ crate:: fmt:: format ( format_args ! ( $ ( $ arg ) * ) ) )
Use the syntax described in std::fmt`std::fmtto create a value of type` to create a value of type String`String. See`.
See std::fmt`std::fmt` for more information.
Examples
fn main() { format!("test"); format!("hello {}", "world!"); format!("x = {}, y = {y}", 10, y = 30); }format!("test"); format!("hello {}", "world!"); format!("x = {}, y = {y}", 10, y = 30);