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.

lib.go 180B

12345678910
  1. package substring
  2. // reverse is a helper fn for Suffixes
  3. func reverse(b []byte) []byte {
  4. n := len(b)
  5. for i := 0; i < n/2; i++ {
  6. b[i], b[n-1-i] = b[n-1-i], b[i]
  7. }
  8. return b
  9. }