github.com/metacubex/mihomo@v1.18.5/common/utils/strings.go (about)

     1  package utils
     2  
     3  func Reverse(s string) string {
     4  	a := []rune(s)
     5  	for i, j := 0, len(a)-1; i < j; i, j = i+1, j-1 {
     6  		a[i], a[j] = a[j], a[i]
     7  	}
     8  	return string(a)
     9  }