Can you read the next line while iterating over byLine?
Mike Parker via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Feb 4 04:24:58 PST 2017
On Saturday, 4 February 2017 at 08:54:27 UTC, Ivan Kazmenko wrote:
> On Thursday, 2 February 2017 at 19:34:37 UTC, John Doe wrote:
>> Thanks readln is perfect. Since I am calling readln in
>> different places and I always need to remove the newline
>> character I have line=line[0..$-1] all over my code. Is there
>> are better way?
>
> "readln.strip" gives the line without the trailing newline
> character.
Or readln.chomp.
More information about the Digitalmars-d-learn
mailing list