string_contains
Checks if a string contains another string.
Example
1
2
{{ 'Hello, world!' | string_contains: 'world' }} => true
{{ 'Hello, world!' | string_contains: 'hi' }} => false
Input
| Type | Parameter | Description | Required |
|---|---|---|---|
| string | haystack | The string to check. Comes before the | sign. | Required |
| string | needle | The string to check for |
Output
| Type | Description |
|---|---|
| bool | True if the string contains the other string, false otherwise |