1STRTOIMAX(P)               POSIX Programmer's Manual              STRTOIMAX(P)
2
3
4

NAME

6       strtoimax, strtoumax - convert string to integer type
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
16

DESCRIPTION

18       These  functions  shall  be equivalent to the strtol(), strtoll(), str‐
19       toul(), and strtoull() functions, except that the  initial  portion  of
20       the string shall be converted to intmax_t and uintmax_t representation,
21       respectively.
22

RETURN VALUE

24       These functions shall return the converted value, if any.
25
26       If no conversion could be performed, zero shall be returned.
27
28       If the correct value is outside  the  range  of  representable  values,
29       {INTMAX_MAX}, {INTMAX_MIN}, or {UINTMAX_MAX} shall be returned (accord‐
30       ing to the return type and sign of the value, if any), and errno  shall
31       be set to [ERANGE].
32

ERRORS

34       These functions shall fail if:
35
36       ERANGE The value to be returned is not representable.
37
38
39       These functions may fail if:
40
41       EINVAL The value of base is not supported.
42
43
44       The following sections are informative.
45

EXAMPLES

47       None.
48

APPLICATION USAGE

50       None.
51

RATIONALE

53       None.
54

FUTURE DIRECTIONS

56       None.
57

SEE ALSO

59       strtol()    ,    strtoul()   ,   the   Base   Definitions   volume   of
60       IEEE Std 1003.1-2001, <inttypes.h>
61
63       Portions of this text are reprinted and reproduced in  electronic  form
64       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
65       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
66       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
67       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
68       event of any discrepancy between this version and the original IEEE and
69       The Open Group Standard, the original IEEE and The Open Group  Standard
70       is  the  referee document. The original Standard can be obtained online
71       at http://www.opengroup.org/unix/online.html .
72
73
74
75IEEE/The Open Group                  2003                         STRTOIMAX(P)
Impressum