View Issue Details

IDProjectCategoryView StatusLast Update
0036246FPCRTLpublic2019-11-02 11:26
ReporterUgochukwu MmaduekweAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.3.1Product Build 
Target VersionFixed in Version3.3.1 
Summary0036246: FPC TStrings Class does not seem to have a TrailingLineBreak property which is available since Delphi 10.1
DescriptionFPC TStrings Class does not have a TrailingLineBreak property which determines whether to add a line Break after the last line of the Text property or not.

See more details here
http://docwiki.embarcadero.com/Libraries/Rio/en/System.Classes.TStrings.TrailingLineBreak
https://stackoverflow.com/questions/58427050/how-do-i-prevent-tstrings-savetofile-creating-a-final-empty-line
TagsNo tags attached.
Fixed in Revision43353
FPCOldBugId
FPCTarget3.2.0
Attached Files

Activities

Thaddy de Koning

2019-11-02 10:17

reporter   ~0118968

Last edited: 2019-11-02 10:27

View 4 revisions

https://www.freepascal.org/docs-html/rtl/classes/tstrings.html

In Freepascal it is called SkipLastLinebreak, which is more precise.
https://www.freepascal.org/docs-html/rtl/classes/tstrings.skiplastlinebreak.html

I think Freepascal had this feature before D10.1.....

You can use a small macro to make them equivalent if you want to support both.
{$macro on}{$define trailingLineBreak:=SkipLastLineBreak}

Ugochukwu Mmaduekwe

2019-11-02 11:23

reporter   ~0118969

@Thaddy, Interesting.
Thanks for this.
I guess it will be nice if FPC makes a property called TrailingLineBreak that internally calls SkipLastLinebreak for Delphi compatibility.

Michael Van Canneyt

2019-11-02 11:26

administrator   ~0118970

I added the compatibility property.

Issue History

Date Modified Username Field Change
2019-11-02 07:55 Ugochukwu Mmaduekwe New Issue
2019-11-02 09:08 Michael Van Canneyt Assigned To => Michael Van Canneyt
2019-11-02 09:08 Michael Van Canneyt Status new => assigned
2019-11-02 10:17 Thaddy de Koning Note Added: 0118968
2019-11-02 10:20 Thaddy de Koning Note Edited: 0118968 View Revisions
2019-11-02 10:22 Thaddy de Koning Note Edited: 0118968 View Revisions
2019-11-02 10:27 Thaddy de Koning Note Edited: 0118968 View Revisions
2019-11-02 11:23 Ugochukwu Mmaduekwe Note Added: 0118969
2019-11-02 11:26 Michael Van Canneyt Status assigned => resolved
2019-11-02 11:26 Michael Van Canneyt Resolution open => fixed
2019-11-02 11:26 Michael Van Canneyt Fixed in Version => 3.3.1
2019-11-02 11:26 Michael Van Canneyt Fixed in Revision => 43353
2019-11-02 11:26 Michael Van Canneyt FPCTarget => 3.2.0
2019-11-02 11:26 Michael Van Canneyt Note Added: 0118970