Macro arcstr::format [−][src]
macro_rules! format {
($text : expr $(,) ?) => { ... };
($text : expr, $($toks : tt) +) => { ... };
}
Expand description
Conceptually equivalent to ArcStr::from(format!("...", args...))
.
Currently, the only difference here is that when used with no formatting
args, this behaves equivalently to arcstr::literal!
.
In the future, this will be implemented in such a way to avoid an additional
string copy which is required by the from
operation.
Example
let arcstr = arcstr::format!("testing {}", 123);
assert_eq!(arcstr, "testing 123");