Containment test

Syntax

	$string1.stringContains($string2)

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

Description

Checks if string1 contains the string string2.

Parameter

Name Type Description Mandatory Default
string1 String A string for which it should be checked whether it contains string2. yes
string2 String A string for which to check whether it is contained in sting1. yes
case-sensitive Boolean Determines whether case sensitivity should also be checked. no false - case sensitivity is not considered.

Return value

Type: Boolean

Whether string1 contains the string string2.

Examples

Simple comparison

	stringContains("Hello world", "hello")

Output: true

Case sensitive comparison 1

	stringContains("Hello world", "hello", true)

Output: false

Case sensitive comparison 2

	stringContains("Hello world", "Hello", true)

Output: true