endsWithIgnoreCase (JavaScript)

Checks whether a string ends with a substring ignoring case.

Defined in

String (Standard - JavaScript)

Syntax

endsWithIgnoreCase(str:string) : boolean
Parameters Description
str A substring.
Return value Description
boolean True if this string ends with the substring ignoring case, or the substring is empty.

Examples

The following comparison is true.
var cities = new String("Paris   Moscow   Tokyo");
if (cities.endsWithIgnoreCase("tokyo"))
	return "Ends with Tokyo";
else
	return "Does not end with Tokyo"