converts the string to a long, without using the built in functions