C# tricky way to convert char to lowercase - and how do the opposite
In this http://stackoverflow.com/a/25486/142014 answer there is a pice of
code to transform a char to lowercase:
// tricky way to convert to lowercase
sb.Append((char)(c | 32));
What is happening in (char)(c | 32) and how is it possible to do the
opposite to transform to uppercase?
No comments:
Post a Comment