Completed string to number function