writeln Function while reading a Text File is printing appending text "before text" and "after text" at the same position

ttk ttk at ciar.org
Wed Jun 3 20:05:52 UTC 2020


On Wednesday, 3 June 2020 at 19:53:03 UTC, BoQsc wrote:
>> Removing the last element of the string got it resolved.
>> Might not be the best way and adding additional check for 
>> carriage return before removing the element would be better, 
>> so this is only initial proof.
>
>
> Improved example with the above comments resolved.

That works, but consider using chomp() instead.

https://dlang.org/phobos/std_string.html#.chomp




More information about the Digitalmars-d-learn mailing list