Comment by alexfoo
4 hours ago
I remember an old project that ran into something like this. I think we just used atoi() or similar and the error check was a string comparison between the original input and a sprintf() of the converted value.
Ugly (and not performant if in a hot path) but it works.
No comments yet
Contribute on Hacker News ↗