- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for Pearce (0.2 sec)
-
src/archive/zip/zip_test.go
a[0] = b for i, l := 1, len(a); i < l; i *= 2 { copy(a[i:], a[:i]) } } func (r *rleBuffer) ReadAt(p []byte, off int64) (n int, err error) { if len(p) == 0 { return } skipParts := sort.Search(len(r.buf), func(i int) bool { part := &r.buf[i] return part.off+part.n > off }) parts := r.buf[skipParts:] if len(parts) > 0 { skipBytes := off - parts[0].off for _, part := range parts {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Mar 27 18:23:49 GMT 2024 - 19.5K bytes - Viewed (0) -
src/bytes/bytes.go
// point in common. func IndexAny(s []byte, chars string) int { if chars == "" { // Avoid scanning all of s. return -1 } if len(s) == 1 { r := rune(s[0]) if r >= utf8.RuneSelf { // search utf8.RuneError. for _, r = range chars { if r == utf8.RuneError { return 0 } } return -1 } if bytealg.IndexByteString(chars, s[0]) >= 0 { return 0 }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Feb 19 19:51:15 GMT 2024 - 33.8K bytes - Viewed (0) -
src/cmd/asm/internal/asm/parse.go
// For FUNCDATA, operands[0] is an immediate constant. // Remaining operands may have references. if len(operands) < 2 { return } operands = operands[1:] } // Search for symbol references. for _, op := range operands { p.start(op) if name, abi, ok := p.funcAddress(); ok { fmt.Fprintf(w, "ref %s %s\n", name, abi) } } }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Feb 21 14:34:57 GMT 2024 - 36.9K bytes - Viewed (0) -
src/archive/zip/reader.go
return &files[i] } } return nil } func (r *Reader) openReadDir(dir string) []fileListEntry { files := r.fileList i := sort.Search(len(files), func(i int) bool { idir, _, _ := split(files[i].name) return idir >= dir }) j := sort.Search(len(files), func(j int) bool { jdir, _, _ := split(files[j].name) return jdir > dir }) return files[i:j] } type openDir struct {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 18:36:46 GMT 2023 - 27.7K bytes - Viewed (0) -
src/bytes/example_test.go
if bytes.Equal(a, b) { // a equal b } if !bytes.Equal(a, b) { // a not equal b } } func ExampleCompare_search() { // Binary search to find a matching byte slice. var needle []byte var haystack [][]byte // Assume sorted i := sort.Search(len(haystack), func(i int) bool { // Return haystack[i] >= needle. return bytes.Compare(haystack[i], needle) >= 0 })
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Mar 04 15:54:40 GMT 2024 - 15K bytes - Viewed (1) -
src/bufio/bufio.go
// [Reader.ReadBytes] or ReadString instead. // ReadSlice returns err != nil if and only if line does not end in delim. func (b *Reader) ReadSlice(delim byte) (line []byte, err error) { s := 0 // search start index for { // Search buffer. if i := bytes.IndexByte(b.buf[b.r+s:b.w], delim); i >= 0 { i += s line = b.buf[b.r : b.r+i+1] b.r += i + 1 break } // Pending error? if b.err != nil {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Oct 12 14:39:08 GMT 2023 - 21.8K bytes - Viewed (0)