Overload List
Overload 1: procedure Split(const Separator: array of Char; const QuoteStart, QuoteEnd: Char; const Count: Integer; const Options: TStringSplitOptions; const List: TSubstringList); overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Separator | array of Char | |
| 2 | QuoteStart | Char | |
| 3 | QuoteEnd | Char | |
| 4 | Count | Integer | |
| 5 | Options | TStringSplitOptions | |
| 6 | List | TSubstringList |
Result: stored in self (calling object)
Overload 2: procedure Split(const Separator: array of Char; const QuoteStart, QuoteEnd: Char; const Count: Integer; const List: TSubstringList); overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Separator | array of Char | |
| 2 | QuoteStart | Char | |
| 3 | QuoteEnd | Char | |
| 4 | Count | Integer | |
| 5 | List | TSubstringList |
Result: stored in self (calling object)
Overload 3: procedure Split(const Separator: array of Char; const QuoteStart, QuoteEnd: Char; const Options: TStringSplitOptions; const List: TSubstringList); overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Separator | array of Char | |
| 2 | QuoteStart | Char | |
| 3 | QuoteEnd | Char | |
| 4 | Options | TStringSplitOptions | |
| 5 | List | TSubstringList |
Result: stored in self (calling object)
Overload 4: procedure Split(const Separator: array of Char; const QuoteStart, QuoteEnd: Char; const List: TSubstringList); overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Separator | array of Char | |
| 2 | QuoteStart | Char | |
| 3 | QuoteEnd | Char | |
| 4 | List | TSubstringList |
Result: stored in self (calling object)
Overload 5: procedure Split(const Separator: array of Char; const Quote: Char; const List: TSubstringList); overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Separator | array of Char | |
| 2 | Quote | Char | |
| 3 | List | TSubstringList |
Result: stored in self (calling object)
Overload 6: procedure Split(const Separator: array of Char; const Count: Integer; const Options: TStringSplitOptions; const List: TSubstringList); overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Separator | array of Char | |
| 2 | Count | Integer | |
| 3 | Options | TStringSplitOptions | |
| 4 | List | TSubstringList |
Result: stored in self (calling object)
Overload 7: procedure Split(const Separator: array of Char; const Count: Integer; const List: TSubstringList); overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Separator | array of Char | |
| 2 | Count | Integer | |
| 3 | List | TSubstringList |
Result: stored in self (calling object)
Overload 8: procedure Split(const Separator: array of Char; const Options: TStringSplitOptions; const List: TSubstringList); overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Separator | array of Char | |
| 2 | Options | TStringSplitOptions | |
| 3 | List | TSubstringList |
Result: stored in self (calling object)
Overload 9: procedure Split(const Separator: array of Char; const List: TSubstringList); overload;
Splits the text into List at the separators: List is cleared, then each part is added.
| # | Name | Description |
|---|---|---|
| 1 | Separator | The separators: characters, or texts (the first found wins; at one position, the first in the array). |
| 2 | Count | The most parts added; the parts after them are not added. |
| 3 | Options | ExcludeEmpty skips every empty part, ExcludeLastEmpty an empty last one. |
| 4 | QuoteStart | With QuoteEnd, the quotes inside which no separator counts: a pair nests, one character toggles. |
| 5 | List | The list the parts are written into; the text may be an item of it. |
Result: stored in self (calling object)
Splitting at characters, with quotes, at texts.
uses Substr, System.SysUtils;
procedure Example;
var List: TSubstringList;
s: Substring;
begin
List := TSubstringList.Create(8);
try
s := Substring('a,b,,c');
s.Split([','], List);
Assert(List.Count = 4);
Assert(List[2].IsEmpty);
s.Split([','], TStringSplitOptions.ExcludeEmpty, List);
Assert(List.Count = 3);
s := Substring('x,"y,z"');
s.Split([','], '"', List);
Assert(List[1] = '"y,z"');
s := Substring('1::2::3');
s.Split(['::'], List);
Assert(List[2] = '3');
finally
List.Free;
end;
end;
Overload 10: procedure Split(const Separator: array of string; const QuoteStart, QuoteEnd: Char; const Count: Integer; const Options: TStringSplitOptions; const List: TSubstringList); overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Separator | array of string | |
| 2 | QuoteStart | Char | |
| 3 | QuoteEnd | Char | |
| 4 | Count | Integer | |
| 5 | Options | TStringSplitOptions | |
| 6 | List | TSubstringList |
Result: stored in self (calling object)
Overload 11: procedure Split(const Separator: array of string; const QuoteStart, QuoteEnd: Char; const Count: Integer; const List: TSubstringList); overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Separator | array of string | |
| 2 | QuoteStart | Char | |
| 3 | QuoteEnd | Char | |
| 4 | Count | Integer | |
| 5 | List | TSubstringList |
Result: stored in self (calling object)
Overload 12: procedure Split(const Separator: array of string; const QuoteStart, QuoteEnd: Char; const Options: TStringSplitOptions; const List: TSubstringList); overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Separator | array of string | |
| 2 | QuoteStart | Char | |
| 3 | QuoteEnd | Char | |
| 4 | Options | TStringSplitOptions | |
| 5 | List | TSubstringList |
Result: stored in self (calling object)
Overload 13: procedure Split(const Separator: array of string; const QuoteStart, QuoteEnd: Char; const List: TSubstringList); overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Separator | array of string | |
| 2 | QuoteStart | Char | |
| 3 | QuoteEnd | Char | |
| 4 | List | TSubstringList |
Result: stored in self (calling object)
Overload 14: procedure Split(const Separator: array of string; const Quote: Char; const List: TSubstringList); overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Separator | array of string | |
| 2 | Quote | Char | |
| 3 | List | TSubstringList |
Result: stored in self (calling object)
Overload 15: procedure Split(const Separator: array of string; const Count: Integer; const Options: TStringSplitOptions; const List: TSubstringList); overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Separator | array of string | |
| 2 | Count | Integer | |
| 3 | Options | TStringSplitOptions | |
| 4 | List | TSubstringList |
Result: stored in self (calling object)
Overload 16: procedure Split(const Separator: array of string; const Count: Integer; const List: TSubstringList); overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Separator | array of string | |
| 2 | Count | Integer | |
| 3 | List | TSubstringList |
Result: stored in self (calling object)
Overload 17: procedure Split(const Separator: array of string; const Options: TStringSplitOptions; const List: TSubstringList); overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Separator | array of string | |
| 2 | Options | TStringSplitOptions | |
| 3 | List | TSubstringList |
Result: stored in self (calling object)
Overload 18: procedure Split(const Separator: array of string; const List: TSubstringList); overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Separator | array of string | |
| 2 | List | TSubstringList |
Result: stored in self (calling object)