I found this code to reverse a string using the or operator,
public static string ReverseXor(string s)
{
if (s == null) return null;
char[] charArray = s.ToCharArray();
int len = s.Length - 1;
for (int i = 0; i < len; i++, len--)
{
charArray[i] ^= charArray[len];
charArray[len] ^= charArray[i];
charArray[i] ^= charArray[len]; }
//some more code
}
The problem is I'm not understand in what's happening inside the for loop, can someone explain this to me?
Thank you.