1STRTOIMAX(3)               Linux Programmer's Manual              STRTOIMAX(3)
2
3
4

NAME

6       strtoimax, strtoumax - convert string to integer
7

SYNOPSIS

9       #include <inttypes.h>
10
11       intmax_t strtoimax(const char *restrict nptr, char **restrict endptr,
12                          int base);
13       uintmax_t strtoumax(const char *restrict nptr, char **restrict endptr,
14                          int base);
15

DESCRIPTION

17       These  functions  are  just  like strtol(3) and strtoul(3), except that
18       they return a value of type intmax_t and uintmax_t, respectively.
19

RETURN VALUE

21       On success, the converted value is returned.  If nothing was  found  to
22       convert, zero is returned.  On overflow or underflow INTMAX_MAX or INT‐
23       MAX_MIN or UINTMAX_MAX is returned, and errno is set to ERANGE.
24

ATTRIBUTES

26       For an  explanation  of  the  terms  used  in  this  section,  see  at‐
27       tributes(7).
28
29       ┌─────────────────────────────────────┬───────────────┬────────────────┐
30Interface                            Attribute     Value          
31       ├─────────────────────────────────────┼───────────────┼────────────────┤
32strtoimax(), strtoumax()             │ Thread safety │ MT-Safe locale │
33       └─────────────────────────────────────┴───────────────┴────────────────┘
34

CONFORMING TO

36       POSIX.1-2001, POSIX.1-2008, C99.
37

SEE ALSO

39       imaxabs(3), imaxdiv(3), strtol(3), strtoul(3), wcstoimax(3)
40

COLOPHON

42       This  page  is  part of release 5.13 of the Linux man-pages project.  A
43       description of the project, information about reporting bugs,  and  the
44       latest     version     of     this    page,    can    be    found    at
45       https://www.kernel.org/doc/man-pages/.
46
47
48
49                                  2021-03-22                      STRTOIMAX(3)
Impressum