Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added strtomax & strtoumax

The process of parsing an integer or floating-point number from a string can produce many errors. The string might not contain a number. It might contain a number of the correct type that is out of range (such as an integer that is larger than INT_MAX). The string may also contain extra information after the number, which may or may not be useful after the conversion. These error conditions must be detected and addressed when a string-to-number conversion is performed using a C Standard Library function.

The strtol(), strtoll(),  strtomax()strtoul(), strtoull(), strtof strtoumax(), strtof(), strtod(), and strtold() functions convert the initial portion of a null-terminated byte string to a long int, long long int, intmax_t, unsigned long intunsigned long long int, uintmax_t, float, double, and long double representation, respectively.

...

The strtol()strtoll()strtomax())strtoul(), strtoull(), strtoumax(), strtof(), strtod(), and strtold() functions convert a null-terminated byte string to long intlong long int, intmax_t, unsigned long intunsigned long long int, uintmax_t, float float, double, and long double representation, respectively.

...