TSubstringList.Last Method

function Last: Substring;

The last item.

Returns: Substring - The last item, read in place as List[Count - 1] reads it.

Examples

The last item, in place.

uses Substr;

procedure Example;
var List: TSubstringList;
begin
    List := TSubstringList.Create(2);
    try
        List.Add('a');
        List.Add('z');
        Assert((List.Last = 'z') and (List.Last.Data = List[1].Data));
    finally
        List.Free;
    end;
end;
See Also: TSubstringList.First, TSubstringList.Strings