Prev Page Next Page
StrCompare
Previous Top Next

Compares two string and returns a value depending on the lexical order of the strings. It returns a number less than zero if the first string is less than the second string. It returns zero if the strings are equal and a number greater than zero if the first string is greater than the second string. If the Compare Constant is omitted, the comparison will be not case sensitive.

Note that the lexical order under Android may differ from that under Windows Mobile because of the different underlying operating systems.

Syntax: StrCompare (String, String [,Compare Constant])
Compare Constant can be: cCaseSensitive or cCaseUnsensitive.

Example:
i = StrCompare (TextBox1.Text, TextBox2.Text, cCaseSensitive)
If i = 0 Then
            Msgbox("Both equal")
Else If i<0 Then
            Msgbox("TextBox1 is smaller")
Else
            Msgbox("TextBox2 is smaller")
End If
Prev Page Next Page
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)