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

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       strtoimax, strtoumax - convert string to integer type
13

SYNOPSIS

15       #include <inttypes.h>
16
17       intmax_t strtoimax(const char *restrict nptr, char **restrict endptr,
18              int base);
19       uintmax_t strtoumax(const char *restrict nptr, char **restrict endptr,
20              int base);
21
22

DESCRIPTION

24       These functions shall be equivalent to the  strtol(),  strtoll(),  str‐
25       toul(),  and  strtoull()  functions, except that the initial portion of
26       the string shall be converted to intmax_t and uintmax_t representation,
27       respectively.
28

RETURN VALUE

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

ERRORS

40       These functions shall fail if:
41
42       ERANGE The value to be returned is not representable.
43
44
45       These functions may fail if:
46
47       EINVAL The value of base is not supported.
48
49
50       The following sections are informative.
51

EXAMPLES

53       None.
54

APPLICATION USAGE

56       None.
57

RATIONALE

59       None.
60

FUTURE DIRECTIONS

62       None.
63

SEE ALSO

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