December 2005
Beginner to intermediate
618 pages
20h 19m
English
strtoumax
Converts a string into an integer value with type uintmax_t
#include <inttypes.h> uintmax_tstrtoumax( const char * restricts, char ** restrictendptr, intbase);
The strtoumax() function is
similar to strtoul(), except that
it converts a string to an integer value of type uintmax_t. If the conversion fails,
strtoumax() returns 0. If the
result of the conversion is outside the range of the type uintmax_t, then strtoumax() returns UINTMAX_MAX, and sets the errno variable to the value of ERANGE (“range error”).
See the example for the analogous function strtoul() in this chapter.
strtoimax(), wcstoimax(), and
wcstoumax(); strtol() and strtoul(); strtod(), strtof(), and strtold(); wcstol() and wcstoul()
Read now
Unlock full access