contains
{% if 'string that contains foo' contains 'foo' %}
// Do something if the string contains the word "foo"
{% endif %}{% if not 'string that contains foo' contains 'not' %}
// Do something if the string dose not contain the word "not"
{% endif %}{% if 'string that contains foo' contains ['no match', 'other match', 'foo'] %}
// Do something if the string contains either of the provided words
{% endif %}Last updated