📜  rust 格式字符串 - Rust 代码示例

📅  最后修改于: 2022-03-11 14:49:25.001000             🧑  作者: Mango

代码示例1
format!("Hello");                 // => "Hello"
format!("Hello, {}!", "world");   // => "Hello, world!"
format!("The number is {}", 1);   // => "The number is 1"
format!("{:?}", (3, 4));          // => "(3, 4)"
format!("{value}", value=4);      // => "4"
format!("{} {}", 1, 2);           // => "1 2"