compare
Summary
Compares the contents of two strings.
Usage
input|compare( compare_with )
Returns
TRUE if the strings match, FALSE otherwise.
Description
This operator compares the contents of two strings and returns TRUE if they're identical, FALSE if they differ.
Examples
Example 1
{'Hello world'|compare( 'Hello world' )}Returns TRUE.
Example 2
{'Hello world'|compare( 'Goodbye world' )}Returns FALSE.
Changed in Exponential 6.0.15
The named parameters of the operator compare in Exponential 6.0.15 (eZTemplateArrayOperator::namedParameterList(), lib/eztemplate/classes/eztemplatearrayoperator.php), by position:
| Position | 6.0.15 (name in the code) | This page |
|---|---|---|
| 1 | compare (mixed), required: Yes., default false | not listed |
Contributors
- Balazs Halasy
- Graham Brookins Updated
Comments
Add a comment