Objective
Implement a function that reads a numeric value from a string, skipping any leading whitespace and handling an optional sign.
Steps
$ atoi(" +7")
7
$ atoi("-300px")
-300
$ atoi("nope")
0
Expected files
Allowed functions
None. Write every helper yourself.
Standard C library
Implements the contract of a function from the standard C library.

Objective
Implement a function that reads a numeric value from a string, skipping any leading whitespace and handling an optional sign.
Steps
$ atoi(" +7")
7
$ atoi("-300px")
-300
$ atoi("nope")
0
Expected files
Allowed functions
None. Write every helper yourself.
Standard C library
Implements the contract of a function from the standard C library.

Tests
Run the tests to grade your code