标签:
package main import "fmt" func main(){ str:="foobar" a:=[]rune(str) for i,j:=0,len(a)-1;i<j;i,j=i+1,j-1{ a[i],a[j]=a[j],a[i] } fmt.Printf("%s\n",string(a)) }
GO逆转字符串
原文地址:http://www.cnblogs.com/honghong75042/p/5126182.html