Contact Free trial Login

startsWith

startsWith(String, String): Boolean

Returns true or false depending on whether the input string starts with a matching prefix.

Parameters

Name Description

text

The input string.

prefix

A string that identifies the prefix.

Example

This example indicates whether the strings start with a given prefix. Note that you can also use the startsWith(text,prefix) notation (for example, startsWith("Mari","Mar")).

Source

%dw 2.0
output application/json
---
[ "Mari" startsWith("Mar"), "Mari" startsWith("Em") ]

Output

[ true, false ]

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.