$string1.stringEndsWith($string2)
$string1.stringEndsWith($string2, $case-sensitive)
Checks if string1 ends with the string string2.
| Name | Type | Description | Mandatory | Default |
|---|---|---|---|---|
| string1 | String | A string for which it is checked whether it ends with string2. |
yes | |
| sting2 | String | A string for which it is checked whether it is at the end of string1. |
yes | |
| case-sensitive | Boolean | Determines whether case sensitivity should also be used. | no | false - case sensitivity is not considered. |
Type: Boolean
Whether string1 ends with string2.
stringEndsWith("Hello world", "world")
Output: true
stringEndsWith("Hello world", "world", true)
Output: true
stringEndsWith("Hello world", "World", true)
Output: false