Noch nicht optimiert genug?
Delphi-Quellcode:
// splitt long lines
for I := Lines.Count - 1 downto 0 do
begin
if Length(Lines[I]) > 1000 then
begin
for I2 := Length(Lines[I]) div 1000 - 1 downto 0 do
Lines.Insert(I + 1, Copy(Lines[I], (I2 * 1000) + Low(string), 1000));
Delete(I);
end;
end;