Function gtmpl::funcs::printf [] [src]

pub fn printf(args: &[Value]) -> Result<Value, String>

An implementation of golang's fmt.Sprintf Limitations: - float: * g, G, and b are weired and not implement yet - pretty sure there are more

Example

use gtmpl::template;
let equal = template(r#"{{ printf "%v %s %v" "Hello" . "!" }}"#, "world");
assert_eq!(&equal.unwrap(), "Hello world !");