fn:endsWith
- 1 Minute to read
- Print
- DarkLight
fn:endsWith
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
The function fn:endsWith tests if a target string ends with the specified substring. The value returned is a Boolean data type.
Example
Recipients with Gmail accounts are welcomed with a specific message. The function searches the target attribute user['Email'] for the value 'gmail.com'. The line of text is inserted into the message with an InsertIf statement, which is constructed as follows:
<%InsertIf expression="${fn:endsWith(user['Email'], 'gmail.com')}"%>Text<%/InsertIf%>
Structure
fn:endsWith(string, string)
Parameters
Parameter | Description |
---|---|
string | Specifies the target string. |
string | The value (suffix) used to query the target. |
Was this article helpful?