On 2012-04-01 16:02, Ali Çehreli wrote:

No difference in that example because it consumes the entire input as
dchars.

But in general, with that inefficient range, it is possible to pull just
one dchar from the input and leave the rest of the stream untouched. For
example, it would be possible to readf() an int right after that:

auto u = byUnicode();

dchar d = u.front; // <-- reads just one dchar from the range

int i;
readf("%s", &i); // <-- continues with std.stdio functions
writeln(i);

With the getline() method, the int must be looked up in the line first,
then from the input.

Ali

Ok, I see, thanks.

--
/Jacob Carlborg

Reply via email to