Target interview question

Convert a string to integer without inbuilt functions