From http://www.w3schools.com (Copyright Refsnes Data)

WMLScript compare() Function


WMLScript String Library Complete WMLScript String Library

The compare() function compares two strings and returns a value that represents the result of the comparison.

The compare() function can return one of the following values:

Syntax

n = String.compare(string1, string2)

Part Description
n The integer returned from the function
string1 A string
string2 A string

Example

var a = String.compare("world","world");
var b = String.compare("I","world");
var c = String.compare("world","I");

Result

a = 0
b = -1
c = 1


WMLScript String Library Complete WMLScript String Library

From http://www.w3schools.com (Copyright Refsnes Data)