(I posted to the forum, but it's better to post here.)
TStringList.Text setter does this
<pre>
Procedure TStrings.DoSetTextStr(const Value: string; DoClear :
Boolean);
...
if FLineBreak=sLineBreak then
begin
While GetNextLine (Value,S,P) do
Add(S)
end
else
While GetNextLineBreak (Value,S,P) do
Add(S);
finally
EndUpdate;
end;
end;
</pre>
here it calls GetNextLine which does SPECIAL handling of #10 and #13 and
#13#10 line breaks. If it does special handling of #10 and #13 and
#13#10 line breaks, why don't we check
if (FLineBreak=#10) or (FLineBreak=#13) or (FLineBreak=#13#10)
but we do simple
if FLineBreak=sLineBreak
Alexey
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal