atoi

Converts a string to an integer

#include <stdlib.h>
long atoi (
        const char *s
)

Arguments

s Pointer to a character string

Return Value

The integer value of the converted character string is returned.

Explanation

The string pointed to by s is converted to its integer equivalent and its value is returned. atoi(s) is equivalent to (long)strtol(s,(char**)NULL). Since int and long are declared as the same type in the R3000, atoi() is also equivalent to atol().

Return Value

The integer value of the converted character string is returned.

See Also

atol(), strtol()