Redgate Software Interview Question

Parse a given string to an integer.