Unit 'Classes' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

TStrings.Slice

Return a subrange of strings starting at a given index.

Declaration

Source position: classesh.inc line 1051

public procedure TStrings.Slice(

  fromIndex: Integer;

  aList: TStrings

); overload;

procedure TStrings.Slice(

  fromIndex: Integer;

  toIndex: Integer;

  aList: TStrings

); overload;

function TStrings.Slice(

  fromIndex: Integer

):TStrings; overload;

function TStrings.Slice(

  fromIndex: Integer;

  toIndex: Integer

):TStrings; 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

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.


Documentation generated on: Dec 21 2024