ibexa

Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

ends_with

Summary

Checks if an array ends with a specific element or sequence.

Usage

input|ends_with( element1 [, element2 [, ... ] ] )

Parameters

NameTypeDescriptionRequired
element1 any An element that should be matched. Yes.
element2 any Another element that should be matched. No.

Returns

TRUE or FALSE.

Description

This operator checks if the input array ends with a specified sequence of elements. If yes, the operator returns TRUE, otherwise FALSE will be returned.

Examples

Example 1

{array( 1, 2, 3, 4, 5, 6, 7 )|ends_with( 5, 6, 7 )}

Returns TRUE.

Example 2

{array( 1, 2, 3, 4, 5, 6, 7 )|ends_with( 4, 5, 6 )}

Returns FALSE.

Balazs Halasy (05/02/2004 9:30 am)

Balazs Halasy (04/05/2005 1:28 pm)


Comments

There are no comments.