Hi,
besser so:
Delphi-Quellcode:
procedure CompactStrings(s: TStrings; maxLength: Integer = 0);
var
i: Integer;
begin
for i := Pred(s.Count) downto 0 do
if Length(s[i] <= maxLength then
s.Delete(i);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
with RichEdit do
begin
Lines.LoadFromFile('StringList.tmp');
CompactStrings(Lines, 1);
end;
end;
Grüße vom marabu
EDIT: Sorry, ich stand wohl im Abseits ...