You could check that there's no whitespace first. Otherwise, this isn't terribly hard to write a parser for, especially if you don't want any fancy features.
On Mon, Oct 24, 2016 at 9:29 AM, Tamas Papp <tkp...@gmail.com> wrote: > Is there a way to make > > parse(Int, " - 42 ") > > throw an error, or substitute with a different function that does this? > > Note that I am not advocating that this should be invalid syntax, just > want to have a "strict" version for reading a dataset that throws an > error unless the integer is not of the "optional sign followed by > digits", without reimplementing Base.parse if possible. >