- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for BinarySearchFunc (0.05 sec)
-
src/archive/zip/reader.go
func (r *Reader) openReadDir(dir string) []fileListEntry { files := r.fileList i, _ := slices.BinarySearchFunc(files, dir, func(a fileListEntry, dir string) int { idir, _, _ := split(a.name) if dir != idir { return strings.Compare(idir, dir) } // find the first entry with dir return +1 }) j, _ := slices.BinarySearchFunc(files, dir, func(a fileListEntry, dir string) int { jdir, _, _ := split(a.name)
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Tue Mar 11 22:19:38 UTC 2025 - 28.4K bytes - Viewed (0) -
src/bytes/example_test.go
// a not equal b } } func ExampleCompare_search() { // Binary search to find a matching byte slice. var needle []byte var haystack [][]byte // Assume sorted _, found := slices.BinarySearchFunc(haystack, needle, bytes.Compare) if found { // Found it! } } func ExampleContains() { fmt.Println(bytes.Contains([]byte("seafood"), []byte("foo")))
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Mon May 12 16:07:54 UTC 2025 - 16.5K bytes - Viewed (0)