Bloomberg interview question

A function to convert numerical string to an integer.