string.endswith Function |
The string.endswith function determines whether a given string ends with a second string.
string.endswith(str, cmp);
str | A string expression |
cmp | A string expression to compare with the end of str |
True if str ends with cmp, otherwise returns false. The test is case-sensitive.
$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 |
string.contains - determines whether a given string contains a second string
string.startswith - determines whether a given string begins with a second string