Domanda di colloquio di Microsoft

Write a function that takes in a string and convert it into integer