ATOL(3)

NAME
atol, atol_l - convert ASCII string to long integer

SYNOPSIS
#include <stdlib.h>
long
atol(const char *nptr);
#include <xlocale.h>
long
atol_l(const char *nptr, locale_t loc);

DESCRIPTION
The atol() and atol_l() functions convert the initial portion of the string pointed to by nptr to long integer representation. The atol() function uses the current locale while atol_l() uses the locale provided as parameter.

It is equivalent to:

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

SEE ALSO
atof(3), atoi(3), atoll(3), strtod(3), strtol(3), strtoul(3) xlocale(3)

STANDARDS
The atol() function conforms to ansiC-99. The atol_l() function is a Darwin extension.