StrComp$ Function

Syntax:
StrComp(Str1,Str2,Comp)
Group: String
Description:
Compare two strings.
Parameter Description

Str1 Compare this string with Str2. If this value is Null then Null is returned.
Str2 Compare this string with Str1. If this value is Null then Null is returned.
Comp This numeric value indicates the type of comparison. If this is omitted or zero then binary comparison is used. Otherwise, text comparison is used. (Text comparison is not case sensitive.)
Result Description

-1 Str1 is less than Str2.
0 Str1 is equal to Str2.
  1. Str1 is greater than Str2.
     
Null Str1 or Str2 is Null.
See Also: LCase$( ), StrConv$( ), UCase$( ).
Example:

Sub Main
Debug
.Print StrComp("F","e") ' -1
Debug
.Print StrComp("F","e",1) ' 1
Debug
.Print StrComp("F","f",1) ' 0
End
Sub