main
CompareResult c1 = GREATER THAN
CompareResult c2 = LESS THAN
bool result = c1 == c2 // result == false
This class contains string compare result constants.
Test whether parameters have the same value.
main
CompareResult c1 = GREATER THAN
CompareResult c2 = LESS THAN
bool result = c1 == c2 // result == false
Test whether parameters are not equal.
main
CompareResult c1 = GREATER THAN
CompareResult c2 = LESS THAN
bool result = c1 != c2 // result == true
String compare result set to EQUAL.
main
String str1 = "a"
String str2 = "a"
CompareResult c = str1.compare to str2 // c == EQUAL
String compare result set to GREATER THAN.
main
String str1 = "b"
String str2 = "a"
CompareResult c = str1.compare to str2 // c == GREATER_THAN
String compare result set to LESS THAN.
main
String str1 = "a"
String str2 = "b"
CompareResult c = str1.compare to str2 // c == LESS_THAN