rocket_dyn_templates::minijinja::filters

Function lines

Source
pub fn lines(s: Arc<str>) -> Value
Expand description

Splits a string into lines.

The newline character is removed in the process and not retained. This function supports both Windows and UNIX style newlines.

{{ "foo\nbar\nbaz"|lines }}
    -> ["foo", "bar", "baz"]