StrComp
The StrComp function does a comparison of two strings
to see if they are identical. You can specify whether you want
to do a binary comparison (case-sensative) or a textual comparison
(case-insensative). The function returns true if the strings are
identical and false if they are not.
With a binary comparison, the strings "Cat" and "cat" will not be
identical because the case of the letters do not match. However,
if you were to do a textual comparison, the strings would match.
By default the StrComp function does binary comparison.
Const sStr1 = "Cat" Const sStr2 = "cat"
Response.Write "Binary Comp: " & StrComp(sStr1, sStr2, vbBinaryCompare) & "<BR>" Response.Write "Textual Comp: " & StrComp(sStr1, sStr2, vbTextualCompare) & "<BR>" Response.Write "Default Comp: " & StrComp(sStr1, sStr2) & "<BR>"
|
 |

|