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:
parent
7ff68b365b
commit
52c9fb6f3d
@ -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]:]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user