Function gtmpl::funcs::len[][src]

pub fn len(args: &[Value]) -> Result<Value, FuncError>
Expand description

Returns the integer length of its argument.

Example

use gtmpl::template;
let equal = template("{{ len . }}", "foo");
assert_eq!(&equal.unwrap(), "3");