Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function IndexOfAnyUnquoted(const AnyOf: array of Char; const StartQuote, EndQuote: Char; const StartIndex: Integer = 0): Integer; overload; | The 0-based index of the first character that is one of AnyOf outside StartQuote ... EndQuote. |
| 2 | function IndexOfAnyUnquoted(const AnyOf: array of Char; const StartQuote, EndQuote: Char; const StartIndex, Count: Integer): Integer; overload; |
Overload 1: function IndexOfAnyUnquoted(const AnyOf: array of Char; const StartQuote, EndQuote: Char; const StartIndex: Integer = 0): Integer; overload;
The 0-based index of the first character that is one of AnyOf outside StartQuote ... EndQuote.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AnyOf | array of Char | |
| 2 | StartQuote | Char | |
| 3 | EndQuote | Char | |
| 4 | StartIndex | Integer |
Returns: Integer - The index, or -1.
Remarks:
The search runs from StartIndex, which must lie outside quotes, to the end or for Count characters; a range outside the text raises ESubstringRangeError.
Examples
A comma inside quotes is skipped.
uses Substr;
procedure Example;
begin
Assert(Substring('"a,b",c').IndexOfAnyUnquoted([','], '"', '"') = 5);
end;
Overload 2: function IndexOfAnyUnquoted(const AnyOf: array of Char; const StartQuote, EndQuote: Char; const StartIndex, Count: Integer): Integer; overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AnyOf | array of Char | |
| 2 | StartQuote | Char | |
| 3 | EndQuote | Char | |
| 4 | StartIndex | Integer | |
| 5 | Count | Integer |
Returns: Integer