readln() returns new line charater

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Dec 28 09:07:25 PST 2013


On 12/28/13 8:49 AM, Jeroen Bollen wrote:
> Why is when you do readln() the newline character (\n) gets read too?
> Wouldn't it make more sense for that character to be stripped off?

So you know that if it returns an empty string the file is done.

Andrei


More information about the Digitalmars-d mailing list