Compare strings |
![]() |
|
|
|
|
|
|
|
|
|
|
Compare will compare the content of the string object to the passed string and return one of the following values:
CompareNoCase works the same way, but performs a case-insensitive compare, and is a bit slower.
|
Windows Note Comparisions are performed with the C RTL functions strcmp / stricmp; however, when compiling with the STR_NO_RTLIBRARY option, comparisions are done using the Windows API function lstrcmp, which yields slightly different results in some cases. For more information, lookup strcmp and lstrcmp in the online help. This affects only the case where one string is greater than the other; equality / inequality always works in the same way when using case-insensitive compare. |
|
|
|
|
|
The == and != operators are overloaded to compare the two strings and return TRUE if they are equal (or not equal). The comparision when using the operators is case-sensitive.
|
|
|
|
|
The comparision operators are overloaded so you can compare two strings with a simple syntax. The return values are the same as those from the Compare method. Notice that the operators always perform a case-sensitive comparision.
See also: Find, Replace, Compare