Add int function to convert from character array to integer