File: util.go

package info (click to toggle)
golang-github-shenwei356-bwt 0.6.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 100 kB
  • sloc: makefile: 2
file content (12 lines) | stat: -rw-r--r-- 304 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
package bwt

import "bytes"

// SliceOfByteSlice is [][]byte
type SliceOfByteSlice [][]byte

func (s SliceOfByteSlice) Len() int { return len(s) }
func (s SliceOfByteSlice) Less(i, j int) bool {
	return bytes.Compare(s[i], s[j]) < 0
}
func (s SliceOfByteSlice) Swap(i, j int) { s[i], s[j] = s[j], s[i] }