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);
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
function | public | System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | System.SysUtils |
説明
現在のロケールに基づき,大文字と小文字を区別して UNICODE 文字列を比較します。
WideCompareStr 関数は,大文字と小文字を区別して S1 と S2 を比較します。比較演算は,現在のロケールによって制御されます。戻り値は以下のとおりです。
ブレーク条件 | 戻り値 |
---|---|
S1 > S2 |
> 0 |
S1 < S2 |
< 0 |
S1 = S2 |
= 0 |
メモ: 文字の大小関係は,ほとんどのロケールでは大文字 > 小文字です。ASCII では逆に小文字の方が大文字より大きい値になります。したがって,S1 を「a」,S2 を「A」に設定すると,WideCompareStr は 0 より小さい値を返し,CompareStr は 0 より大きい値を返します。