fn:endsWith
    • 1 Minute to read
    • Dark
      Light

    fn:endsWith

    • Dark
      Light

    Article summary

    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?

    What's Next
    ESC

    AI Assistant, facilitating knowledge discovery through conversational intelligence