Click or drag to resize

string.endswith Function

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

The string.endswith function determines whether a given string ends with a second string.

Syntax

Alchemy
string.endswith(str, cmp);

Nomenclature

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

Returns

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

Example

Alchemy
$myString = "Telogis";
PRINT string.endswith($myString, "gis");
PRINT string.endswith($myString, "gig");
PRINT string.endswith($myString, "giS");

The above code snippet produces the following output:

True

False

False

See Also