How to swap the first and last char of a String