Invert the case of a mixed case string (can I use regex?)
Posted on 2006-06-26
I have a string that contains a mixed bag of upper and lowercase letters.
I need to invert these (upper to lower, lower to upper) so my question is do I have to iterate through each letter and swap it or can I use a smaller, cleaner method (perhaps using a regex expression??).