Remove unwanted ' \r ' from an Array ... by reading a *.txt file.

Mil58 peter_pinkness at yahoo.fr
Thu Oct 24 16:49:09 UTC 2019


On Thursday, 24 October 2019 at 16:21:47 UTC, welkam wrote:
> On Thursday, 24 October 2019 at 15:27:05 UTC, Mil58 wrote:
>> [...]
>
> void main() {
>     File("data.txt", "r+")
>         .byLineCopy()
>         .array()
>         .each!writeln;
> }
>
> byLineCopy removes the new lines. If in the future you would 
> need the new line symbol call byLineCopy(Yes.keepTerminator)

Sorry but not working ... Surely i'm not able to insert and adapt 
to my own script !  :-(
Could you, please, modify with the right syntax at the right 
place ? - Thanks.


More information about the Digitalmars-d-learn mailing list