Everything

atoi


Converts a decimal-representing string to an int type integer.

[Format]

#include <stdlib.h>

long atoi (const char *nptr);

[Parameters]

nptr Pointer to a number-representing string to be converted

[Return values]

Converted data as an int type integer

[Remarks]

If the converted result overflows, errno is set.

Data is converted up to the first character that does not fit the decimal data type.

The atoi function does not guarantee the return value if an error such as an overflow occurs. When you want to acquire the guaranteed return value, use the strtol function.