From Clomosy Docs
function AnsiCompareStr(const S1, S2: string):Integer;
Compares strings based on the current locale with case sensitivity.
AnsiCompareStr compares S1 to S2, with case sensitivity. The comparison operation is controlled by the current locale. The return value is one of the following.
s1 < s2 : < 0
s1 = s2 : = 0
s1 > s2 : > 0
Note: Most locales consider lowercase characters to be less than the corresponding uppercase characters. This is in contrast to ASCII order, in which lowercase characters are greater than uppercase characters. Thus, setting S1 to 'a' and S2 to 'A' causees AnsiCompareStr to return a value less than zero, while CompareStr, with the same arguments, returns a value greater than zero.
The comparison is not affected by length - it is carried out on a letter by letter basis. But a longer string is greater than a shorter, otherwise matching string.
The comparison is case sensitive.
Example
var
initialValue,secondValue : String;
resultValue :Integer;
{
initialValue = 'Clomosy';
secondValue = 'Clomosy';
resultValue = AnsiCompareStr(initialValue, secondValue);
if (resultValue < 0) ShowMessage(initialValue+' < '+secondValue);
if (resultValue == 0) ShowMessage(initialValue+' = '+secondValue);
if (resultValue > 0) ShowMessage(initialValue+' > '+secondValue);
}
Output:
Clomosy = Clomosy