The function atoi() turns a char* into an integer, with certain constraints.
There can be whitespace in front of the integer, but no alphabet characters. The number stops when a non-integer character is read.
Valid strings to pass to atoi():
" 103a39" -> 103
"9438745" -> 9438745
"-394" -> -394
Invalid strings:
"a5445a"
".25465"
|