Objective
Implement a function that reads a string encoding an integer in a given base and returns its decimal value.
Steps
$ parse_int_base(" +ff", 16)
255
$ parse_int_base("-1010stop", 2)
-10
$ parse_int_base("cafe", 16)
51966
Expected files
Allowed functions
None. Write every helper yourself.

Objective
Implement a function that reads a string encoding an integer in a given base and returns its decimal value.
Steps
$ parse_int_base(" +ff", 16)
255
$ parse_int_base("-1010stop", 2)
-10
$ parse_int_base("cafe", 16)
51966
Expected files
Allowed functions
None. Write every helper yourself.

Tests
Run the tests to grade your code