equalsIgnoreCase (JavaScript)

Checks whether a string equals another string ignoring case.

Defined in

String (Standard - JavaScript)

Syntax

equalsIgnoreCase(object:any) : boolean

equalsIgnoreCase(str:string) : boolean

Parameters Description
object Any object.
str Any string.
Return value Description
boolean True if this string equals the string ignoring case; otherwise false.

Examples

This example evaluates to true.
var cities = new String("Paris   Moscow   Tokyo");
var object = new Object("PARIS   MOSCOW   TOKYO");
if (cities.equalsIgnoreCase(object))
	return "Equal";
else
	return "Not equal"