Write a function that takes a string as input and returns the string reversed.
Example:
Given s = "hello", return "olleh".
func reverseString(s string) string {
rs := []rune(s)
for i, j := 0, len(rs)-1; i < len(rs)/2; i, j = i+1, j-1 {
rs[i], rs[j] = rs[j], rs[i]
}
return string(rs)
}
字符串通过编程[]rune来操作?