Objective
Implement a function that converts the start of a string into a signed long for a chosen base, then writes back the address of the first character it could not convert.
Steps
$ long v = strtol("0x1A rest", &end, 0); /* v, end-str */
26 off=4
$ long v = strtol(" -17abc", &end, 10); /* v, end-str */
-17 off=5
$ long v = strtol("zzz", &end, 10); /* v, end-str */
0 off=0
Expected files
Allowed functions
None. Write every helper yourself.
Allowed headers
Standard C library
Implements the contract of a function from the standard C library.

Objective
Implement a function that converts the start of a string into a signed long for a chosen base, then writes back the address of the first character it could not convert.
Steps
$ long v = strtol("0x1A rest", &end, 0); /* v, end-str */
26 off=4
$ long v = strtol(" -17abc", &end, 10); /* v, end-str */
-17 off=5
$ long v = strtol("zzz", &end, 10); /* v, end-str */
0 off=0
Expected files
Allowed functions
None. Write every helper yourself.
Allowed headers
Standard C library
Implements the contract of a function from the standard C library.

Tests
Run the tests to grade your code