RAD Studio VCL Reference
|
Compare two strings with case-sensitivity.
function CompareStr(const S1: AnsiString; const S2: AnsiString): Integer; overload; function CompareStr(const S1: AnsiString; const S2: AnsiString; LocaleOptions: TLocaleOptions): Integer; overload;
int CompareStr(const AnsiString S1, const AnsiString S2); int CompareStr(const AnsiString S1, const AnsiString S2, TLocaleOptions LocaleOptions);
CompareStr compares the strings S1 to S2, with case-sensitivity. The return value is less than 0 if S1 < S2, 0 if S1 = S2, or greater than 0 if S1 > S2. The compare operation is based on the 8-bit ordinal value of each character and is not affected by the current user locale.
Use CompareText to compare strings without case-sensitivity.
Use AnsiCompareStr to compare strings for the current user locale.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|