>>516
for(int i = 0; i < length; ++i) tmp = str[i], str[i] = str[length - i - 1], str[length - i - 1] = tmp;