From Clomosy Docs
function CompareStr(const S1, S2: string): Integer;
Compares two strings, with case sensitivity.
CompareStr compares S1 to S2, with case sensitivity. The return value is less than 0 if S1 is less than S2, 0 if S1 equals S2, or greater than 0 if S1 is greater than S2. The comparison operation is based on the 16-bit ordinal value of each character and is not affected by the current locale, when using the first CompareStr overloaded method.
Note: The AnsiCompareStr function should be used, which takes into account multi-byte strings and accented characters.
The return value is one of the following.
s1 < s2 : < 0
s1 = s2 : = 0
s1 > s2 : > 0
Example
var
initialValue,secondValue : String;
resultValue :Integer;
{
initialValue = 'Clomosy';
secondValue = 'Clomosy';
resultValue = CompareStr(initialValue, secondValue);
if (resultValue < 0) ShowMessage(initialValue+' < '+secondValue);
if (resultValue == 0) ShowMessage(initialValue+' = '+secondValue);
if (resultValue > 0) ShowMessage(initialValue+' > '+secondValue);
}
Output:
Clomosy = Clomosy