mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-15 05:31:18 +08:00
10 lines
163 B
Go
10 lines
163 B
Go
|
package utils
|
||
|
|
||
|
func Reverse(s string) string {
|
||
|
a := []rune(s)
|
||
|
for i, j := 0, len(a)-1; i < j; i, j = i+1, j-1 {
|
||
|
a[i], a[j] = a[j], a[i]
|
||
|
}
|
||
|
return string(a)
|
||
|
}
|