Debian Codegraph @

upstream/debian-unstable/man3/strtoimax.3

raw
1 '\" t
2 .\" Copyright 2003, Andries E. Brouwer <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: GPL-2.0-or-later
6 .\"
7 .TH strtoimax 3 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 strtoimax, strtoumax \- convert string to integer
10 .SH LIBRARY
11 Standard C library
12 .RI ( libc ,\~ \-lc )
13 .SH SYNOPSIS
14 .nf
15 .B #include <inttypes.h>
16 .P
17 .BI "intmax_t strtoimax(const char *restrict " nptr ", char **restrict " endptr ,
18 .BI " int " base );
19 .BI "uintmax_t strtoumax(const char *restrict " nptr ", char **restrict " endptr ,
20 .BI " int " base );
21 .fi
22 .SH DESCRIPTION
23 These functions are just like
24 .BR strtol (3)
25 and
26 .BR strtoul (3),
27 except that they return a value of type
28 .I intmax_t
29 and
30 .IR uintmax_t ,
31 respectively.
32 .SH RETURN VALUE
33 On success, the converted value is returned.
34 If nothing was found to convert, zero is returned.
35 On overflow or underflow
36 .B INTMAX_MAX
37 or
38 .B INTMAX_MIN
39 or
40 .B UINTMAX_MAX
41 is returned, and
42 .I errno
43 is set to
44 .BR ERANGE .
45 .SH ATTRIBUTES
46 For an explanation of the terms used in this section, see
47 .BR attributes (7).
48 .TS
49 allbox;
50 lbx lb lb
51 l l l.
52 Interface Attribute Value
53 T{
54 .na
55 .nh
56 .BR strtoimax (),
57 .BR strtoumax ()
58 T} Thread safety MT-Safe locale
59 .TE
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)