1strtoimax(3)               Library Functions Manual               strtoimax(3)
2
3
4

NAME

6       strtoimax, strtoumax - convert string to integer
7

LIBRARY

9       Standard C library (libc, -lc)
10

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

ATTRIBUTES

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

STANDARDS

39       C11, POSIX.1-2008.
40

HISTORY

42       POSIX.1-2001, C99.
43

SEE ALSO

45       imaxabs(3), imaxdiv(3), strtol(3), strtoul(3), wcstoimax(3)
46
47
48
49Linux man-pages 6.04              2023-03-30                      strtoimax(3)
Impressum