]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) |
2 | .\" | |
1dd72f9c | 3 | .\" %%%LICENSE_START(GPLv2+_DOC_FULL) |
fea681da MK |
4 | .\" This is free documentation; you can redistribute it and/or |
5 | .\" modify it under the terms of the GNU General Public License as | |
6 | .\" published by the Free Software Foundation; either version 2 of | |
7 | .\" the License, or (at your option) any later version. | |
8 | .\" | |
9 | .\" The GNU General Public License's references to "object code" | |
10 | .\" and "executables" are to be interpreted as the output of any | |
11 | .\" document formatting or typesetting system, including | |
12 | .\" intermediate and printed output. | |
13 | .\" | |
14 | .\" This manual is distributed in the hope that it will be useful, | |
15 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | .\" GNU General Public License for more details. | |
18 | .\" | |
19 | .\" You should have received a copy of the GNU General Public | |
c715f741 MK |
20 | .\" License along with this manual; if not, see |
21 | .\" <http://www.gnu.org/licenses/>. | |
6a8d8745 | 22 | .\" %%%LICENSE_END |
fea681da | 23 | .\" |
460495ca | 24 | .TH STRTOIMAX 3 2015-08-08 "" "Linux Programmer's Manual" |
fea681da MK |
25 | .SH NAME |
26 | strtoimax, strtoumax \- convert string to integer | |
27 | .SH SYNOPSIS | |
28 | .nf | |
29 | .B #include <inttypes.h> | |
68e4db0a | 30 | .PP |
b9f02710 | 31 | .BI "intmax_t strtoimax(const char *" nptr ", char **" endptr ", int " base ); |
c13182ef | 32 | .BI "uintmax_t strtoumax(const char *" nptr ", char **" endptr ", int " base ); |
fea681da MK |
33 | .fi |
34 | .SH DESCRIPTION | |
c13182ef | 35 | These functions are just like |
fb186734 | 36 | .BR strtol (3) |
fea681da | 37 | and |
fb186734 | 38 | .BR strtoul (3), |
fea681da | 39 | except that they return a value of type |
f19a0f03 | 40 | .I intmax_t |
fea681da | 41 | and |
f19a0f03 | 42 | .IR uintmax_t , |
fea681da | 43 | respectively. |
47297adb | 44 | .SH RETURN VALUE |
fea681da MK |
45 | On success, the converted value is returned. |
46 | If nothing was found to convert, zero is returned. | |
47 | On overflow or underflow | |
48 | .B INTMAX_MAX | |
49 | or | |
50 | .B INTMAX_MIN | |
51 | or | |
52 | .B UINTMAX_MAX | |
53 | is returned, and | |
54 | .I errno | |
55 | is set to | |
56 | .BR ERANGE . | |
88576984 | 57 | .SH ATTRIBUTES |
d9ad96e4 PH |
58 | For an explanation of the terms used in this section, see |
59 | .BR attributes (7). | |
60 | .TS | |
61 | allbox; | |
62 | lbw24 lb lb | |
63 | l l l. | |
64 | Interface Attribute Value | |
65 | T{ | |
66 | .BR strtoimax (), | |
88576984 | 67 | .BR strtoumax () |
d9ad96e4 PH |
68 | T} Thread safety MT-Safe locale |
69 | .TE | |
47297adb | 70 | .SH CONFORMING TO |
03bbb72e | 71 | POSIX.1-2001, POSIX.1-2008, C99. |
47297adb | 72 | .SH SEE ALSO |
fea681da MK |
73 | .BR imaxabs (3), |
74 | .BR imaxdiv (3), | |
75 | .BR strtol (3), | |
76 | .BR strtoul (3), | |
77 | .BR wcstoimax (3) |