FactSet Interview Question

write a function for atoi(string) ?