TStringList.Append

From Soldat Community Wiki
Jump to: navigation, search
procedure Append(S: string)
 S: string to be added

Description

This procedure does exactly the same thing as Add, it just doesn't return the index.

Example

var
  s: TStringList;
  i: integer;

begin
  s := File.CreateStringList();
  s.Append('a');
  s.Append('b');
  s.Append('d');
  s.Sort();
  s.Sorted := TRUE;

  s.Append('c');
  WriteLn(s.CommaText);
  // a,b,c,d
  s.Free;
end.