[Issue 17438] std.conv.parse documentation contradiction

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Jun 25 15:52:01 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=17438

--- Comment #3 from Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> ---
(In reply to Brad Roberts from comment #2)
> The entire family
> is documented as not throwing.

Where does it say that?

I think you're misinterpreting what "It does not throw if it could not convert
the entire input" means. It does not mean "it does not throw, period". It also
doesn't mean "It does not throw if it could not convert any part of the input".
What it means is that if it finds a valid value at the start of the input,
which it consumes and returns, it leaves the rest of the input in place, which
is useful when you need to parse as much of a string (or character range) up
until a non-specific separator or character not representing the value.

--


More information about the Digitalmars-d-bugs mailing list