Suffix test

Syntax

	$string1.stringEndsWith($string2)

$string1.stringEndsWith($string2, $case-sensitive)

Description

Checks if string1 ends with the string string2.

Parameters

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.

Return value

Type: Boolean

Whether string1 ends with string2.

Examples

Simple test

	stringEndsWith("Hello world", "world")

Output: true

Case sensitive test 1

	stringEndsWith("Hello world", "world", true)

Output: true

Case sensitive test 2

	stringEndsWith("Hello world", "World", true)

Output: false