ends_with
Summary
Checks if a string ends with a specific character/sequence.
Usage
input|ends_with( sequence )
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| sequence | string | The string that should be matched. | Yes. |
Returns
TRUE if there is a match, FALSE otherwise.
Description
This operator checks if the input string ends with a specified sequence of characters. If yes, the operator returns TRUE, otherwise FALSE will be returned.
Examples
Example 1
{'Linux is great!'|ends_with( 'great!' )}Returns TRUE.
Example 2
{'Linux is great!'|begins_with( 'Linux' )}Returns FALSE.
Contributors
- Balazs Halasy Maintainer
- Ester Heylen Updated Maintainer
- chs Commenter
Comments (1 historical)
Written by readers of the earlier documentation sites, kept as they were.
Typo in example ?
chs ·
Isn't the second example somewhat wrong as it uses the begins_with() operator instead of ends_with() ?