Function gtmpl::funcs::urlquery [] [src]

pub fn urlquery(args: &[Arc<Any>]) -> Result<Arc<Any>, String>

Returns the escaped value of the textual representation of its arguments in a form suitable for embedding in a URL query.

Example

use gtmpl::template;
let url = template(r#"{{ urlquery "foo bar?" }}"#, 0);
assert_eq!(&url.unwrap(), "foo%20bar%3F");