macro_rules! sprintf {
($fmt:expr, $($arg:expr),*) => { ... };
}
Expand description
Format a string. (Roughly equivalent to snprintf
or asprintf
in C)
Takes a printf-style format string format
and a variable number of
additional arguments.
use sprintf::sprintf;
let s = sprintf!("%s = %*d", "forty-two", 4, 42).unwrap();
assert_eq!(s, "forty-two = 42");
Wrapper around vsprintf.