Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function IndexOfAny(const AnyOf: array of Char; const StartIndex: Integer = 0): Integer; overload; | The 0-based index of the first character that is one of AnyOf, from StartIndex to the end or for Count characters. |
| 2 | function IndexOfAny(const AnyOf: array of Char; const StartIndex, Count: Integer): Integer; overload; |
Overload 1: function IndexOfAny(const AnyOf: array of Char; const StartIndex: Integer = 0): Integer; overload;
The 0-based index of the first character that is one of AnyOf, from StartIndex to the end or for Count characters.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AnyOf | array of Char | |
| 2 | StartIndex | Integer |
Returns: Integer - The index, or -1.
Remarks:
A range outside the text raises ESubstringRangeError.
Examples
The first separator.
uses Substr;
procedure Example;
var s: Substring;
begin
s := Substring('a=b;c');
Assert(s.IndexOfAny(['=', ';']) = 1);
Assert(s.IndexOfAny(['=', ';'], 2) = 3);
end;
Overload 2: function IndexOfAny(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