Solution for String to Integer (atoi)