Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function CompareTo(const strB: Substr.Substring): Integer; overload; | Compares the text with strB, ordinal. |
| 2 | function CompareTo(const strB: string): Integer; overload; |
Overload 1: function CompareTo(const strB: Substr.Substring): Integer; overload;
Compares the text with strB, ordinal.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | strB | Substr.Substring |
Returns: Integer - Compare's value: 0 when equal, else the difference of the first differing characters, or of the lengths when one text is a prefix of the other.
Examples
Ordering two texts.
uses Substr;
procedure Example;
begin
Assert(Substring('b').CompareTo('a') = 1);
end;
Overload 2: function CompareTo(const strB: string): Integer; overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | strB | string |
Returns: Integer