]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) |
2 | .\" | |
e4a74ca8 | 3 | .\" SPDX-License-Identifier: GPL-2.0-or-later |
fea681da | 4 | .\" |
45186a5d | 5 | .TH STRTOIMAX 3 2021-03-22 "Linux man-pages (unreleased)" |
fea681da MK |
6 | .SH NAME |
7 | strtoimax, strtoumax \- convert string to integer | |
2a889c6b AC |
8 | .SH LIBRARY |
9 | Standard C library | |
8fc3b2cf | 10 | .RI ( libc ", " \-lc ) |
fea681da MK |
11 | .SH SYNOPSIS |
12 | .nf | |
13 | .B #include <inttypes.h> | |
68e4db0a | 14 | .PP |
8a0684ec AC |
15 | .BI "intmax_t strtoimax(const char *restrict " nptr ", char **restrict " endptr , |
16 | .BI " int " base ); | |
17 | .BI "uintmax_t strtoumax(const char *restrict " nptr ", char **restrict " endptr , | |
18 | .BI " int " base ); | |
fea681da MK |
19 | .fi |
20 | .SH DESCRIPTION | |
c13182ef | 21 | These functions are just like |
fb186734 | 22 | .BR strtol (3) |
fea681da | 23 | and |
fb186734 | 24 | .BR strtoul (3), |
fea681da | 25 | except that they return a value of type |
f19a0f03 | 26 | .I intmax_t |
fea681da | 27 | and |
f19a0f03 | 28 | .IR uintmax_t , |
fea681da | 29 | respectively. |
47297adb | 30 | .SH RETURN VALUE |
fea681da MK |
31 | On success, the converted value is returned. |
32 | If nothing was found to convert, zero is returned. | |
33 | On overflow or underflow | |
34 | .B INTMAX_MAX | |
35 | or | |
36 | .B INTMAX_MIN | |
37 | or | |
38 | .B UINTMAX_MAX | |
39 | is returned, and | |
40 | .I errno | |
41 | is set to | |
42 | .BR ERANGE . | |
88576984 | 43 | .SH ATTRIBUTES |
d9ad96e4 PH |
44 | For an explanation of the terms used in this section, see |
45 | .BR attributes (7). | |
c466875e MK |
46 | .ad l |
47 | .nh | |
d9ad96e4 PH |
48 | .TS |
49 | allbox; | |
c466875e | 50 | lbx lb lb |
d9ad96e4 PH |
51 | l l l. |
52 | Interface Attribute Value | |
53 | T{ | |
54 | .BR strtoimax (), | |
88576984 | 55 | .BR strtoumax () |
d9ad96e4 PH |
56 | T} Thread safety MT-Safe locale |
57 | .TE | |
c466875e MK |
58 | .hy |
59 | .ad | |
60 | .sp 1 | |
3113c7f3 | 61 | .SH STANDARDS |
03bbb72e | 62 | POSIX.1-2001, POSIX.1-2008, C99. |
47297adb | 63 | .SH SEE ALSO |
fea681da MK |
64 | .BR imaxabs (3), |
65 | .BR imaxdiv (3), | |
66 | .BR strtol (3), | |
67 | .BR strtoul (3), | |
68 | .BR wcstoimax (3) |