Question d’entretien chez Microsoft

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