(s sorted.KeyValue, prefix string)
| 619 | } |
| 620 | |
| 621 | func queryPrefixString(s sorted.KeyValue, prefix string) sorted.Iterator { |
| 622 | if prefix == "" { |
| 623 | return s.Find("", "") |
| 624 | } |
| 625 | lastByte := prefix[len(prefix)-1] |
| 626 | if lastByte == 0xff { |
| 627 | panic("unsupported query prefix ending in 0xff") |
| 628 | } |
| 629 | end := prefix[:len(prefix)-1] + string(lastByte+1) |
| 630 | return s.Find(prefix, end) |
| 631 | } |
| 632 | |
| 633 | func (x *Index) queryPrefixString(prefix string) sorted.Iterator { |
| 634 | return queryPrefixString(x.s, prefix) |
no test coverage detected