See also: compare

Determines whether or not two strings are equal.

Syntax

JSV_compareNoCase(expS1, expS2)

Prototype

expS1.compareNoCase(expS2)

Returns

The compareNoCase function returns true if expS1 and expS2 are equal.

Parameters

The compareNoCase function uses the following arguments.

Argument Description
expS1 One of the strings that is to be evaluated for equality.
expS2 The other string that is to be evaluated for equality.

Remarks

n/a

Dependencies

n/a

Example

The following lines of code

var testString1 = "bob", testString2 = "Bob";
document.write("Is " + testString1 + " is equal to " + testString2 + "? " + 
               testString1.compareNoCase(testString2) );

var testString1 = "BOB", testString2 = "Bob";
document.write("Is " + testString1 + " is equal to " + testString2 + "? " + 
               testString1.compareNoCase(testString2) );

var testString1 = "Bob", testString2 = "Bob";
document.write("Is " + testString1 + " is equal to " + testString2 + "? " + 
               testString1.compareNoCase(testString2) );

produce