支付模块
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
247 B

  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. }