|
Packit |
7cfc04 |
.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
|
|
Packit |
7cfc04 |
.\"
|
|
Packit |
7cfc04 |
.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
|
|
Packit |
7cfc04 |
.\" This is free documentation; you can redistribute it and/or
|
|
Packit |
7cfc04 |
.\" modify it under the terms of the GNU General Public License as
|
|
Packit |
7cfc04 |
.\" published by the Free Software Foundation; either version 2 of
|
|
Packit |
7cfc04 |
.\" the License, or (at your option) any later version.
|
|
Packit |
7cfc04 |
.\"
|
|
Packit |
7cfc04 |
.\" The GNU General Public License's references to "object code"
|
|
Packit |
7cfc04 |
.\" and "executables" are to be interpreted as the output of any
|
|
Packit |
7cfc04 |
.\" document formatting or typesetting system, including
|
|
Packit |
7cfc04 |
.\" intermediate and printed output.
|
|
Packit |
7cfc04 |
.\"
|
|
Packit |
7cfc04 |
.\" This manual is distributed in the hope that it will be useful,
|
|
Packit |
7cfc04 |
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
7cfc04 |
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit |
7cfc04 |
.\" GNU General Public License for more details.
|
|
Packit |
7cfc04 |
.\"
|
|
Packit |
7cfc04 |
.\" You should have received a copy of the GNU General Public
|
|
Packit |
7cfc04 |
.\" License along with this manual; if not, see
|
|
Packit |
7cfc04 |
.\" <http://www.gnu.org/licenses/>.
|
|
Packit |
7cfc04 |
.\" %%%LICENSE_END
|
|
Packit |
7cfc04 |
.\"
|
|
Packit |
7cfc04 |
.TH STRTOIMAX 3 2015-08-08 "" "Linux Programmer's Manual"
|
|
Packit |
7cfc04 |
.SH NAME
|
|
Packit |
7cfc04 |
strtoimax, strtoumax \- convert string to integer
|
|
Packit |
7cfc04 |
.SH SYNOPSIS
|
|
Packit |
7cfc04 |
.nf
|
|
Packit |
7cfc04 |
.B #include <inttypes.h>
|
|
Packit |
7cfc04 |
.PP
|
|
Packit |
7cfc04 |
.BI "intmax_t strtoimax(const char *" nptr ", char **" endptr ", int " base );
|
|
Packit |
7cfc04 |
.BI "uintmax_t strtoumax(const char *" nptr ", char **" endptr ", int " base );
|
|
Packit |
7cfc04 |
.fi
|
|
Packit |
7cfc04 |
.SH DESCRIPTION
|
|
Packit |
7cfc04 |
These functions are just like
|
|
Packit |
7cfc04 |
.BR strtol (3)
|
|
Packit |
7cfc04 |
and
|
|
Packit |
7cfc04 |
.BR strtoul (3),
|
|
Packit |
7cfc04 |
except that they return a value of type
|
|
Packit |
7cfc04 |
.I intmax_t
|
|
Packit |
7cfc04 |
and
|
|
Packit |
7cfc04 |
.IR uintmax_t ,
|
|
Packit |
7cfc04 |
respectively.
|
|
Packit |
7cfc04 |
.SH RETURN VALUE
|
|
Packit |
7cfc04 |
On success, the converted value is returned.
|
|
Packit |
7cfc04 |
If nothing was found to convert, zero is returned.
|
|
Packit |
7cfc04 |
On overflow or underflow
|
|
Packit |
7cfc04 |
.B INTMAX_MAX
|
|
Packit |
7cfc04 |
or
|
|
Packit |
7cfc04 |
.B INTMAX_MIN
|
|
Packit |
7cfc04 |
or
|
|
Packit |
7cfc04 |
.B UINTMAX_MAX
|
|
Packit |
7cfc04 |
is returned, and
|
|
Packit |
7cfc04 |
.I errno
|
|
Packit |
7cfc04 |
is set to
|
|
Packit |
7cfc04 |
.BR ERANGE .
|
|
Packit |
7cfc04 |
.SH ATTRIBUTES
|
|
Packit |
7cfc04 |
For an explanation of the terms used in this section, see
|
|
Packit |
7cfc04 |
.BR attributes (7).
|
|
Packit |
7cfc04 |
.TS
|
|
Packit |
7cfc04 |
allbox;
|
|
Packit |
7cfc04 |
lbw24 lb lb
|
|
Packit |
7cfc04 |
l l l.
|
|
Packit |
7cfc04 |
Interface Attribute Value
|
|
Packit |
7cfc04 |
T{
|
|
Packit |
7cfc04 |
.BR strtoimax (),
|
|
Packit |
7cfc04 |
.BR strtoumax ()
|
|
Packit |
7cfc04 |
T} Thread safety MT-Safe locale
|
|
Packit |
7cfc04 |
.TE
|
|
Packit |
7cfc04 |
.SH CONFORMING TO
|
|
Packit |
7cfc04 |
POSIX.1-2001, POSIX.1-2008, C99.
|
|
Packit |
7cfc04 |
.SH SEE ALSO
|
|
Packit |
7cfc04 |
.BR imaxabs (3),
|
|
Packit |
7cfc04 |
.BR imaxdiv (3),
|
|
Packit |
7cfc04 |
.BR strtol (3),
|
|
Packit |
7cfc04 |
.BR strtoul (3),
|
|
Packit |
7cfc04 |
.BR wcstoimax (3)
|
|
Packit |
7cfc04 |
.SH COLOPHON
|
|
Packit |
7cfc04 |
This page is part of release 4.15 of the Linux
|
|
Packit |
7cfc04 |
.I man-pages
|
|
Packit |
7cfc04 |
project.
|
|
Packit |
7cfc04 |
A description of the project,
|
|
Packit |
7cfc04 |
information about reporting bugs,
|
|
Packit |
7cfc04 |
and the latest version of this page,
|
|
Packit |
7cfc04 |
can be found at
|
|
Packit |
7cfc04 |
\%https://www.kernel.org/doc/man\-pages/.
|