Does string.isNumeric mean that parse!int will not throw?

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Thu Feb 20 20:28:57 PST 2014


On Thursday, 20 February 2014 at 19:46:35 UTC, w0rp wrote:
> if (s.length > 0 && s.all!isDigit) {
>      // Never throws now.
>      auto x = parse!int(s);
> }

Nope, integer overflow exception. Though I didn't check if it 
would actually through that, but it should.


More information about the Digitalmars-d-learn mailing list