1strtoimax(3) Library Functions Manual strtoimax(3)
2
3
4
6 strtoimax, strtoumax - convert string to integer
7
9 Standard C library (libc, -lc)
10
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
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
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
29 For an explanation of the terms used in this section, see at‐
30 tributes(7).
31
32 ┌─────────────────────────────────────┬───────────────┬────────────────┐
33 │Interface │ Attribute │ Value │
34 ├─────────────────────────────────────┼───────────────┼────────────────┤
35 │strtoimax(), strtoumax() │ Thread safety │ MT-Safe locale │
36 └─────────────────────────────────────┴───────────────┴────────────────┘
37
39 C11, POSIX.1-2008.
40
42 POSIX.1-2001, C99.
43
45 imaxabs(3), imaxdiv(3), strtol(3), strtoul(3), wcstoimax(3)
46
47
48
49Linux man-pages 6.04 2023-03-30 strtoimax(3)