Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleIndex_Lookup (0.14 sec)

  1. src/index/suffixarray/example_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package suffixarray_test
    
    import (
    	"fmt"
    	"index/suffixarray"
    )
    
    func ExampleIndex_Lookup() {
    	index := suffixarray.New([]byte("banana"))
    	offsets := index.Lookup([]byte("ana"), -1)
    	for _, off := range offsets {
    		fmt.Println(off)
    	}
    
    	// Unordered output:
    	// 1
    	// 3
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Aug 21 01:10:22 UTC 2016
    - 433 bytes
    - Viewed (0)
Back to top