Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function LastIndexOfAny(const AnyOf: array of Char): Integer; overload; | The 0-based index of the last character that is one of AnyOf, in the text, in [0, StartIndex], or in the Count characters that end at StartIndex. |
| 2 | function LastIndexOfAny(const AnyOf: array of Char; const StartIndex: Integer): Integer; overload; | |
| 3 | function LastIndexOfAny(const AnyOf: array of Char; const StartIndex, Count: Integer): Integer; overload; |
Overload 1: function LastIndexOfAny(const AnyOf: array of Char): Integer; overload;
The 0-based index of the last character that is one of AnyOf, in the text, in [0, StartIndex], or in the Count characters that end at StartIndex.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AnyOf | array of Char |
Returns: Integer - The index, or -1.
Remarks:
StartIndex = -1 with Count = 0 is an empty range; a range outside the text raises ESubstringRangeError.
Examples
The last separator.
uses Substr;
procedure Example;
begin
Assert(Substring('a=b;c').LastIndexOfAny(['=', ';']) = 3);
end;
Overload 2: function LastIndexOfAny(const AnyOf: array of Char; const StartIndex: Integer): Integer; overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AnyOf | array of Char | |
| 2 | StartIndex | Integer |
Returns: Integer
Overload 3: function LastIndexOfAny(const AnyOf: array of Char; const StartIndex, Count: Integer): Integer; overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AnyOf | array of Char | |
| 2 | StartIndex | Integer | |
| 3 | Count | Integer |
Returns: Integer