CompareText
Compares two strings by ordinal value without case sensitivity.
Structure
CompareText(string1,string2): Integer;
Parameters
Return Value
Description
CompareText compares S1 and S2 and returns 0 if they are equal. If S1 is greater than S2, CompareText returns an integer greater than 0. If S1 is less than S2, CompareText returns an integer less than 0. CompareText is not case sensitive and is not affected by the current Windows locale.
Thus for example, CompareText will indicate that the string
ABC
is less than
aaa
because A is less than a in ascii order. This is in contrast to a case-insensitive comparison, where the B would make the first string larger, or a locale-based comparison (most locales consider capital letters larger than small). |