ez.no / exponential / documentation / reference / template operators / arrays / begins_with
$input_array|begins_with( integer1 [, integer2 [, ... ] ] )
| Name | Type | Description | Required |
|---|---|---|---|
| interger1 | integer | Interger value to match first element in input array | yes |
| interger2 | integer | Interger value to match second element in input array | no |
| ... |
true if the parameters match the first elemnts in the input array, false if not.
The begins_with operator checks if the inputted string or array begins with a specified element/character/sequence (or not). Returns true or false.
{array( 1, 2, 3, 4, 5, 6, 7 )|begins_with( 1, 2, 3 )}
returns true.
{array( 1, 2, 3, 4, 5, 6, 7 )|begins_with( 2, 3, 4 )}
returns false.
log in or create a user account to comment.
Comments