Thread: 'C-' and 'C+'
View Single Post
Old May 9th, 2005, 11:39 AM   #14
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
That can be stretched out to ch = ch & 0xDF;, or ch = ch & 223;. What this does is remove the third bit (from the left), making the character uppercase if it's a letter. You need to understand bit mathematics and the ASCII table to understand this. Basically, it's doing the same thing as ch = toupper(ch);.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote