反轉字串
Version = 2.2
let aString = "This is a test string."
// first, reverse the String's characters
let reversedCharacters = aString.characters.reverse()
// then convert back to a String with the String() initializer
let reversedString = String(reversedCharacters)
print(reversedString) // ".gnirts tset a si sihT"
Version = 3.0
let reversedCharacters = aString.characters.reversed()
let reversedString = String(reversedCharacters)