Format a string into a StringBuf
.
Example
use std::fmt::format;
let s = format!("{} + {} = {}", 1, 2, 3).unwrap();
defer s.free();
assert_eq!(s[..] as &[u8], "1 + 2 = 3");
Run this example
Format a string into a StringBuf
.
use std::fmt::format;
let s = format!("{} + {} = {}", 1, 2, 3).unwrap();
defer s.free();
assert_eq!(s[..] as &[u8], "1 + 2 = 3");
Run this example