ez.no / exponential / documentation / reference / template operators / strings / compare
$input_string|compare(string compare_with)
| Name | Type | Description | Required |
|---|
true if strings match, false otherwise.
This operator compares the contents of two strings and returns true if they're the same, false if they differ. This is the same operator as the "compare" operator inthe arrays category.
{let my_string="asdf"} {let your_string="asdf"} {$my_string|compare($your_string)} {/let} {/let}
returns true.
{let my_string="asdf"} {let your_string="asd"} {$my_string|compare($your_string)} {/let} {/let}
returns false.
Log in or create a user account to comment.
Comments