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%>
CODE
Structure
fn:endsWith(string, string)
Parameters
Parameter | Description |
---|
string | Specifies the target string. |
string | The value (suffix) used to query the target. |