atol_l
Convert ASCII string to long or long long integer
Interface
#include <stdlib.h>
long | atol (const char *nptr) |
long long | atoll (const char *nptr) |
#include <xlocale.h>
long | atol_l (const char *nptr, locale_t loc) |
long long | atoll_l (const char *nptr, locale_t loc) |
Description
The atol function converts the initial portion of the string pointed to by nptr to long integer representation. It is equivalent to:strtol(nptr, (char **)NULL, 10);The atoll function converts the initial portion of the string pointed to by nptr to long long integer representation. It is equivalent to:
strtoll(nptr, (char **)NULL, 10);While the atol and atoll functions use the current locale, the atol_l and atoll_l functions may be passed locales directly.