GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


Manpage of ATOI

ATOI

Index
 

NAME

atoi, atol, atoll, atoq - convert a string to an integer  

SYNOPSIS

#include <stdlib.h>

int atoi(const char *nptr);

long atol(const char *nptr);
long long atoll(const char *nptr);
long long atoq(const char *nptr);
 

DESCRIPTION

The fBatoi()fP function converts the initial portion of the string pointed to by fInptrfP to int. The behaviour is the same as

strtol(nptr, (char **)NULL, 10);

except that fBatoi()fP does not detect errors.

The fBatol()fP and fBatoll()fP functions behave the same as fBatoi()fR, except that they convert the initial portion of the string to their return type of fIlongfP or fIlong longfP. fBatoq()fP is an obsolete name for fBatoll()fP.  

RETURN VALUE

The converted value.  

CONFORMING TO

SVID 3, POSIX.1, BSD 4.3, ISO/IEC 9899. ISO/IEC 9899:1990 (C89) and POSIX.1 (1996 edition) include the functions fBatoi()fP and fBatol()fP only; C99 adds the function fBatoll()fP.  

NOTES

The non-standard fBatoq()fP function is not present in libc 4.6.27 or glibc 2, but is present in libc5 and libc 4.7 (though only as an inline function in fB<stdlib.h>fP until libc 5.4.44). The fBatoll()fP function is present in glibc 2 since version 2.0.2, but not in libc4 or libc5.  

SEE ALSO

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


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
CONFORMING TO
NOTES
SEE ALSO