TStrings.Slice¶
Return a subrange of strings starting at a given index.
Declaration¶
Source position: classesh.inc line 1166
public
procedure Slice(fromIndex: Integer; aList: TStrings); overload; overload;
procedure Slice(fromIndex: Integer; toIndex: Integer; aList: TStrings)
; overload; overload;
function Slice(fromIndex: Integer) : TStrings; overload; overload;
function Slice(fromIndex: Integer; toIndex: Integer) : TStrings
; overload; overload;
Description¶
Slice adds to aList the strings in the current list, starting with the string at index FromIndex. If aList is not specified, a TStringList instance is created and used. The caller must free the new instance.
See also¶
| Name | Description |
|---|---|
| TStrings.Filter | Return a filtered list. |
| TStrings.Shift | Return and remove the first string in the list. |
| TStrings.Pop | Remove the last string of the list and return it. |
| TStrings.Map | Call a map routine for each string in the list. |
| TStrings.Delete | Delete a string from the list. |
| TStrings.Insert | Insert a string in the list. |