Class CompareResult

This class contains string compare result constants.

Methods


(bool) <compareresult c1> == <compareresult c2>

Test whether parameters have the same value.

Parameters

Return value

Example

main
  CompareResult c1 = GREATER THAN
  CompareResult c2 = LESS THAN
  bool result = c1 == c2          // result == false
              

(bool) <compareresult c1> != <compareresult c2>

Test whether parameters are not equal.

Parameters

Return value

Example

main
  CompareResult c1 = GREATER THAN
  CompareResult c2 = LESS THAN
  bool result = c1 != c2          // result == true
              

(compareresult) EQUAL

String compare result set to EQUAL.

Return value

Example

main
  String str1 = "a"
  String str2 = "a"
  CompareResult c = str1.compare to str2       // c == EQUAL
                    

(compareresult) GREATER THAN

String compare result set to GREATER THAN.

Return value

Example

main
  String str1 = "b"
  String str2 = "a"
  CompareResult c = str1.compare to str2       // c == GREATER_THAN
                    

(compareresult) LESS THAN

String compare result set to LESS THAN.

Return value

Example

main
  String str1 = "a"
  String str2 = "b"
  CompareResult c = str1.compare to str2       // c == LESS_THAN