Ah, da war jemand schneller, habs getestet, ist wirklich schnell.
Delphi-Quellcode:
sl.BeginUpdate;
try
i2 := 0;
for i := 0 to sl.Count - 1 do
begin
if sl[i] <> '' then
begin
sl[i2] := sl[i];
Inc(i2);
end;
end;
for i := sl.Count - 1 downto i2 do
sl.Delete(i);
finally
sl.EndUpdate;
end;