Various utility functions. strToInt (partial parseInt implementation) complete.