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