vindhya said:
Thanks a lot guys.
The solution proposed above works. What I find that whatever be the
approach the solution will always be on ASCII difference between the
integral value of upper and lower case.
Above? The only thing I see "above" is the article headers.
Perhaps you can offer us some advice. We've been trying repeatedly to
teach people how to post properly, but it just doesn't work. The
groups.google.com interface is broken, but it's still possible to use
it correctly. As we've posted here hundreds of times:
If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.
And yet we *still* see people posting through groups.google.com with
no attributions and no context, apparently assuming (incorrectly) that
everyone who reads the followup can see the parent article.
Other than getting Google to fix their interface (we've tried that
too), how can we spread the word? How can we make people understand
that blindly posting with no context is disrupting this newsgroup?
What would have worked for you?
(And as for your original question, just use toupper() and tolower().
Changing case by bit manipulation is error-prone, non-portable, and
completely unnecessary. Why do you think toupper() and tolower() were
written in the first place?)