Click or drag to resize

string.contains Function

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
string.contains Function

The string.contains function determines whether a given string contains a second string.

Syntax

Alchemy
string.contains(str, cmp);

Nomenclature

strA string expression
cmp A string expression to compare with the contents of str

Returns

True if str contains with cmp, otherwise returns false. The test is case-sensitive.

Example

Alchemy
$myString = "Telogis";
PRINT string.contains($myString, "Mick");
PRINT string.contains($myString, "el");
PRINT string.contains($myString, "eL");

The above code snippet produces the following output:

False

True

False

See Also

  • string.endswith - determines whether a given string ends with a second string

  • string.startswith - determines whether a given string begins with a second string