Everything

strtoimax [V1.07 or later]


Converts a character string to an integer (intmax_t type) and stores the pointer to the last character string.

[Classification]

Standard library

[Syntax]

#include <inttypes.h>

intmax_t __far strtoimax(const char __near * restrict nptr, char __near * __near * restrict endptr, int base); (C99)

intmax_t __far _COM_strtoimax_ff(const char __far * restrict nptr, char __far * __far * restrict endptr, int base); (C99)

[Return value]

If the partial character string has been converted, the converted value is returned. If the character string could not be converted, 0 is returned.

If an overflow occurs, this function returns INTMAX_MAX or INTMAX_MIN and sets macro ERANGE to global variable errno.

[Description]

This function skips 0 or more columns of white-space characters (character which makes the isspace function true) from the start of the string indicated by nptr, and converts the string from the next character into an intmax_t-type representation. If base is 0, the string is interpreted as the C radix representation. If base is in the range from 2 to 36, the string is interpreted as a radix. When endptr is not a null pointer, the pointer to the remaining strings that were not converted is set in endptr.