:man| Alphabetical   Categories   About us 
 
ATOI (3) | C library functions | Unix Manual Pages | :man

NAME

atoi - convert ASCII string to integer

CONTENTS

Library
Synopsis
Description
Implementation Notes
Errors
See Also
Standards

LIBRARY


.Lb libc

SYNOPSIS


.In stdlib.h int atoi "const char *nptr"

DESCRIPTION

The atoi function converts the initial portion of the string pointed to by nptr to
.Vt int representation.

It is equivalent to:
(int)strtol(nptr, (char **)NULL, 10);

IMPLEMENTATION NOTES

The atoi function is not thread-safe and also not async-cancel safe.

The atoi function has been deprecated by strtol and should not be used in new code.

ERRORS

The function atoi need not affect the value of errno on an error.

SEE ALSO

atof(3), atol(3), strtod(3), strtol(3), strtoul(3)

STANDARDS


Share this page

     Follow us

Facebook Twitter Google+ LinkedIn


 
Created by Blin Media, 2008-2013