revert a string