String.Comp (gb)

Static Function Comp ( String As String, String2 As String [ , Mode As Integer ] ) As Integer

Compares two UTF-8 strings, and returns:
  • 0 if the two strings are equal.

  • 1 if String1 is strictly greater than String2.

  • -1 if String1 is strictly lower than String2.

The Mode parameter can be any combination defined in the sort and comparison paragraph in the Predefined Constants page.

Note that the gb.Language comparison flag is always set by default. If you do not want to compare strings according to the current language, use the Comp function.

See also