var
i : integer;
sResult : string;
pSplit : TStringList;
begin
pSplit := TStringList.Create;
try
{ define delimiter }
pSplit.Delimiter := ';';
{ - split it }
pSplit.Clear;
pSplit.DelimitedText := 'This;is;a;list';
{ - list it }
sResult := '';
for i := 0 to pSplit.Count - 1 do
begin
sResult := sResult + pSplit[i] + #13;
end;
ShowMessage( sResult );
finally
pSplit.Free;
end;
Output: Microsoft AX 2012, X++, C#, SQL server, SSRS, Java, JavaFX, Oracle, PL/SQL, Delphi - codes examples, step-by-step tutorials, experiences.
Monday, June 11, 2018
DELPHI - How to split string with TStringList class support
For string split you can use class TStringList.
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment