System.SysUtils.WideCompareStr
Delphi
function WideCompareStr(const S1, S2: WideString): Integer;
C++
extern DELPHI_PACKAGE int __fastcall WideCompareStr(const System::WideString S1, const System::WideString S2);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | System.SysUtils |
Description
Compares Unicode strings based on the current locale with case sensitivity.
WideCompareStr compares S1 to S2, with case sensitivity. The comparison operation is controlled by the current locale. The return value is one of the following.
Condition | Return Value |
---|---|
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. With S1 set to 'a' and S2 set to 'A', WideCompareStr returns a value lsess than zero, while CompareStr returns a value greater than zero.