支付模块
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 年之前
12345678910
  1. package stringutil
  2. // Reverse returns its argument string reversed rune-wise left to right.
  3. func Reverse(s string) string {
  4. r := []rune(s)
  5. for i, j := 0, len(r)-1; i < len(r)/2; i, j = i+1, j-1 {
  6. r[i], r[j] = r[j], r[i]
  7. }
  8. return string(r)
  9. }