logo
pub fn replace(
    _state: &State<'_, '_>,
    v: String,
    from: String,
    to: String
) -> Result<String, Error>
This is supported on crate feature builtins only.
Expand description

Does a string replace.

It replaces all ocurrences of the first parameter with the second.

{{ "Hello World"|replace("Hello", "Goodbye") }}
  -> Goodbye World