I have the following function:
var
Colunas : TStringlist;
Item: TListItem;
begin
Colunas := TStringlist.Create;
Colunas.Text := StringReplace('00:46:30@21/08/2014@Carlos dos Santos@São Paulo',
'@',Char(13)+Char(10),[rfReplaceAll]);
Item := LV.Items.Add;
Item.SubItems.Add(Colunas[0]);
Item.SubItems.Add(Colunas[1]);
Item.SubItems.Add(Colunas[2]);
It separates by columns using the @ delimiter, in which case I put it manually. But, I have a file called client.txt and inside it there are several lines of type:
00: 46: 30 @ 21/08/2014 @ Carlos dos Santos @ São Paulo
00: 46: 30 @ 21/08/2014 @ João da Silva @ São Paulo
How can I read this file, using the same function above and put everything inside a LISTVIEW?
Related: Explode in Delphi