Overload List
| # | Signature | Description |
|---|---|---|
| 1 | class function CompareInvariant(const StrA: string; const IndexA: Integer; const StrB: string; const IndexB, Length: Integer; const IgnoreCase: Boolean): Integer; overload; static; | |
| 2 | class function CompareInvariant(const StrA, StrB: string; const IgnoreCase: Boolean): Integer; overload; static; | Compares StrA with StrB, or Length characters of each from IndexA and IndexB (0-based), by UTF-16 code unit; IgnoreCase True ignores case by the operating system's uppercase table, the same under every locale. |
Overload 1: class function CompareInvariant(const StrA: string; const IndexA: Integer; const StrB: string; const IndexB, Length: Integer; const IgnoreCase: Boolean): Integer; overload; static;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | StrA | string | |
| 2 | IndexA | Integer | |
| 3 | StrB | string | |
| 4 | IndexB | Integer | |
| 5 | Length | Integer | |
| 6 | IgnoreCase | Boolean |
Returns: Integer
Overload 2: class function CompareInvariant(const StrA, StrB: string; const IgnoreCase: Boolean): Integer; overload; static;
Compares StrA with StrB, or Length characters of each from IndexA and IndexB (0-based), by UTF-16 code unit; IgnoreCase True ignores case by the operating system's uppercase table, the same under every locale.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | StrA | string | |
| 2 | StrB | string | |
| 3 | IgnoreCase | Boolean |
Returns: Integer - 0 when equal, else the difference of the first differing pair, in upper case when IgnoreCase is True, or of the lengths when one text is a prefix of the other.
Remarks:
Every text kind, both texts of one kind. A window outside its text raises ESubstringRangeError. Note: This routine is 8.0 to 45 times slower than CompareAscii due to the operating system's case table. Use CompareAscii, if A to Z is enough.
Examples
Accented letters in either case.
uses Substr;
procedure Example;
begin
Assert(Substring.CompareInvariant('ab'#$E9, 'AB'#$C9, True) = 0);
end;
See Also: Substring.CompareAscii, Substring.CompareAscii, Substring.CompareLinguistic, Substring.CompareLinguistic, Substring.CompareLinguistic, Substring.CompareLinguistic, Substring.CompareLinguistic, Substring.CompareLinguistic, Substring.CompareLinguistic, Substring.CompareLinguistic, Substring.CompareLinguistic, Substring.CompareLinguistic, Substring.CompareLinguistic, Substring.CompareLinguistic