I have grown accustomed to strtod and variants. I am wondering why there is no strtoi shipped with stdlib.h. Why is it that the integer is left out of this part
strtod
This is what I have been using.
long long_val; int int_value; errno = 0; long_val = strtol (theString, NULL, 10); if (errno) handle_error; if ((long) someIntMin > long_val || long_val > (long) someIntMax) handle_invalid; int_value = (int) long_val;