Function minijinja::filters::replace

source ·
pub fn replace(
    _state: &State<'_, '_>,
    v: Cow<'_, str>,
    from: Cow<'_, str>,
    to: Cow<'_, str>
) -> String
Available on crate feature builtins only.
Expand description

Does a string replace.

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

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