Commit 52c9fb6f authored by Robert Griesemer's avatar Robert Griesemer

suffixarray: provide accessor to data

R=r
CC=golang-dev
https://golang.org/cl/3574044
parent 7ff68b36
......@@ -49,6 +49,14 @@ func New(data []byte) *Index {
}
// Data returns the data over which the index was created.
// It must not be modified.
//
func (x *Index) Data() []byte {
return x.data
}
func (x *Index) at(i int) []byte {
return x.data[x.sa[i]:]
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment