#include <stdlib.h>
long atol (
char *string); /* string to convert */
Description
The atol function converts string into a
long integer value. The input string must be a
sequence of characters that can be interpreted as a long integer.
This function stops processing characters from string at the first one it cannot recognize as part of the
number.
The string passed to atol must have the
following format:
〚whitespace〛 〚{+|-}〛 digits
Where
whitespace
May be any number of space(' '), tab ('\t'),
newline ('\n'), or carriage return ('\r') characters.
digits
May be one or more decimal digits.
Return Value
The atol function returns the long integer value that is
produced by interpreting the characters in string
as a number.
If no conversion could be performed, 0 is returned.
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.