Gett interview question

Given a string, convert it to int