Einzelnen Beitrag anzeigen

Benutzerbild von 3_of_8
3_of_8

Registriert seit: 22. Mär 2005
Ort: Dingolfing
4.129 Beiträge
 
Turbo Delphi für Win32
 
#4

Re: TStringlist: Delete in einer Schleife

  Alt 5. Sep 2006, 14:32
Delphi-Quellcode:
I:=0;
while I=0<t.count do
begin
  if t[I]:=Suchstring then t.delete[I];
  inc(I);
end;
Listen sind nebenbei 0-basiert. Von 1 bis t.count kriegst du sowieso ne Exception.
Manuel Eberl
„The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.“
- Terry Pratchett
  Mit Zitat antworten Zitat