1
0
mirror of https://github.com/golang/go synced 2024-11-24 06:40:17 -07:00

suffixarray: provide accessor to data

R=r
CC=golang-dev
https://golang.org/cl/3574044
This commit is contained in:
Robert Griesemer 2010-12-13 17:08:01 -08:00
parent 7ff68b365b
commit 52c9fb6f3d

View File

@ -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]:]
}