Talk:Visual Basic/Built In String Functions

The StrComp function and Option Compare Text do the same job. As stated correctly they use a lexicographic comparison of text. But there are two options for StrComp, these being:

0 = vbBinaryCompare - Perform a binary comparison 1 = vbTextCompare - Perform a textual comparison

The vbTextCompare and Option Compare Text options are indentical. In English texts this comparison probably doesn't matter and indeed could be used for a case insensitive match. But in other languages, say for example Norwegian it does matter and double characters such as 'ae' may be treated differently.

If in doubt, use the relational operators as these do a direct comparison. Only use StrComp if you're interested in sorting in languages other than English.


 * Please include this in the page at the relevant place. Also it would be helpful to everyone if you were to create an account and sign your contributions with four tilde characters like this ~ .  Then each entry in the talk page gets the name (or pseudonym) and date and time.  Lastly, welcome to Visual Basic Classic.   --kwhitefoot 10:41, 16 October 2005 (UTC)