$string1.stringStartsWith($string2)
$string1.stringStartsWith($string2, $case-sensitive)
Checks if string1 starts with the string string2.
| Name | Type | Description | Mandatory | Default |
|---|---|---|---|---|
| string1 | String | A string for which it is checked whether it starts with string2. |
yes | |
| string2 | String | A string for which it is checked whether it is at the beginning 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 starts with string2.
stringStartsWith("Hello world", "Hello")
Output: true
stringStartsWith("Hello world", "Hello", true)
Output: false
stringStartsWith("Hello world", "hello", true)
Output: false