Contact Free trial Login

endsWith

endsWith(String, String): Boolean

Returns true if a string ends with a provided substring, false if not.

Parameters

Name Description

text

The input string (a String).

suffix

The suffix string to find at the end of the input string.

Example

This example finds "no" (but not "to") at the end of "Mariano".

Source

%dw 2.0
output application/json
---
[ "Mariano" endsWith "no", "Mariano" endsWith "to" ]

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.