]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/strtoimax.3
b0d810d2bb12a2bb6562fb3c0f6ecd676f59212c
[thirdparty/man-pages.git] / man3 / strtoimax.3
1 .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
2 .\"
3 .\" SPDX-License-Identifier: GPL-2.0-or-later
4 .\"
5 .TH STRTOIMAX 3 2021-03-22 "" "Linux Programmer's Manual"
6 .SH NAME
7 strtoimax, strtoumax \- convert string to integer
8 .SH LIBRARY
9 Standard C library
10 .RI ( libc ", " \-lc )
11 .SH SYNOPSIS
12 .nf
13 .B #include <inttypes.h>
14 .PP
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 );
19 .fi
20 .SH DESCRIPTION
21 These functions are just like
22 .BR strtol (3)
23 and
24 .BR strtoul (3),
25 except that they return a value of type
26 .I intmax_t
27 and
28 .IR uintmax_t ,
29 respectively.
30 .SH RETURN VALUE
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 .
43 .SH ATTRIBUTES
44 For an explanation of the terms used in this section, see
45 .BR attributes (7).
46 .ad l
47 .nh
48 .TS
49 allbox;
50 lbx lb lb
51 l l l.
52 Interface Attribute Value
53 T{
54 .BR strtoimax (),
55 .BR strtoumax ()
56 T} Thread safety MT-Safe locale
57 .TE
58 .hy
59 .ad
60 .sp 1
61 .SH CONFORMING TO
62 POSIX.1-2001, POSIX.1-2008, C99.
63 .SH SEE ALSO
64 .BR imaxabs (3),
65 .BR imaxdiv (3),
66 .BR strtol (3),
67 .BR strtoul (3),
68 .BR wcstoimax (3)