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

Ali Çehreli acehreli at yahoo.com
Thu Oct 24 17:38:11 UTC 2019


On 10/24/2019 10:21 AM, Ali Çehreli wrote:
>    auto lines = File(fileName, "r").byLineCopy(No.keepTerminator, '\r');
>    auto result = lines.joiner("-").text;

I would normally do the following

   auto lines = File(fileName, "r").byLineCopy(No.keepTerminator, '\r');
   auto result = format!"%-(%s-%)"(lines);

But I ran into the following issue:

   https://issues.dlang.org/show_bug.cgi?id=20317

Ali



More information about the Digitalmars-d-learn mailing list