Redgate Software interview question

Parse a given string to an integer.