Why does readln include the line terminator?
Denis Koroskin
2korden at gmail.com
Tue Apr 14 07:14:08 PDT 2009
On Tue, 14 Apr 2009 18:01:52 +0400, Manfred Nowak <svv1999 at hotmail.com> wrote:
> Georg Wrede wrote:
>
>> because to do anything useful with a string, you have to strip the
>> terminator
>
> This is false in case of simple copying. And I doubt, that for more
> complex operations splitting `readln' into `readlnBody' and
> `readlnEOL' and calling them intermittent would be of any benefit.
>
> -manfred
>
Tango does the best by having an optional parameter that denotes whether a line ending needs to be retained.
More information about the Digitalmars-d
mailing list