This function parses an integer and returns it along with the pointer to the next char not part of the number.