TStringList.GetText

From Soldat Community Wiki
Jump to: navigation, search
function GetText(): PChar
 Result: contents of a stringlist as PChar

Description

Function returns the contents as a PChar; series of strings, separated by an end-of-line marker.

Example

var
  s: TStringList;

begin
  s := File.CreateStringList();
  s.Append('a');
  s.Append('b');
  
  WriteLn(s.GetText);
  {
  a
  b
  
  }
  
  s.Free;
end.