No way to parse integers in C (2022)
Source: News.Ycombinator
Published:
<p>There are a few ways to attempt to parse a string into a number in the C standard library. They are ALL broken.</p> <p>Update at the bottom: Actually C++’s std::from_chars() looks useful.</p> <p>Leaving aside the wide character versions, and staying with long (skipping int , long long or intmax_t