Implemented isSpace() without using regexp.