fn:startsWith
- 1 Minute to read
- Print
- DarkLight
fn:startsWith
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
The function fn:startsWith determines whether a target string starts with the specified substring. The value returned is a Boolean data type.
Example
A special message is sent to recipients within a specific postal code. The function searches the target attribute user['ZipCode'] for the value 'SW'. The line of text is inserted into the message with an InsertIf statement, which is constructed as follows:
<%InsertIf expression="${fn:startsWith(user['ZipCode'], 'SW')}"%>Text<%/InsertIf%>
Structure
fn:startsWith(string, string)
Parameters
Parameter | Description |
---|---|
string | Specifies the target string. |
string | The value (prefix) used to query the target. |
Was this article helpful?