Function hex

Source
pub fn hex(v: i64) -> String
Expand description

Return the hexadecimal representation of the integer value

assert_eq!(
  exec_template(serde_json::Value::Null, "{{hex 42}}"),
  "0x2a"
);
assert_eq!(
  exec_template(json!({ "value": 42 }), "{{hex value}}"),
  "0x2a"
);