String to Long or Int types without inbuilt functions