Thanks
Daniel
Memo1.Lines.LoadFromFile('FileWithLongLines.TXT');
Memo1.Lines.SaveToFile('WhatHappened.TXT');
then open the WhatHappened.TXT with NotePad and see for yourself.
"Daniel K" <Daniel....@Advalvas.be> wrote in message
news:39d2eccf$1_2@dnews...
Daniel
Daniel
Memo1.Lines.Text := AdjustLineBreaks(Memo1.Lines.Text);
Force length of line?
Isn't that up to the editor?
for I := 0 to Memo1.Lines.Count - 1 do
begin
if Length(Memo1.Lines[I] < 67) then
Memo1.Lines[I] := Memo1.Lines[I] + StringOfChar(' ', 67 -
Length(Memo1.Lines[I]));
end;
-ThomasN
Daniel K wrote:
const limit = 67;
var S: String; i: Integer;
begin
S := Memo1.Text;
Memo1.Clear;
repeat
i := limit;
while S[i] <> ' ' do
Dec(i);
Memo1.Lines.Add(Trim(Copy(S, 1, i)));
Delete(S, 1, i);
until Length(S) = 0;
end;
Dave, this does the trick! Thanks. Now why didn't I think of this before ;-)
Daniel