strings: reverse string in place and with no additional memory