Use uc and lc rather than toopper and tolower as suggested by Clive Holloway.