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