[Issue 11231] formattedRead accepts silently trailing space past the string to match, but no other character
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Jul 20 21:05:34 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=11231
Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> ---
I believe formattedRead correctly mimics the behaviour of C's scanf function.
See the documentation e.g. on http://www.cplusplus.com/reference/cstdio/scanf/.
The relevant part is:
> A single whitespace in the format string validates any quantity
> of whitespace characters extracted from the stream (including none).
Emphasis on "including none".
As such, I believe the behaviour is as expected, so I'm going to close this,
but please reopen if you have a compelling argument to do so.
--
More information about the Digitalmars-d-bugs
mailing list