- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for LastIndexByte (0.62 sec)
-
src/bytes/example_test.go
// Output: // 5 // 3 // -1 } func ExampleLastIndexByte() { fmt.Println(bytes.LastIndexByte([]byte("go gopher"), byte('g'))) fmt.Println(bytes.LastIndexByte([]byte("go gopher"), byte('r'))) fmt.Println(bytes.LastIndexByte([]byte("go gopher"), byte('z'))) // Output: // 3 // 8 // -1 } func ExampleLastIndexFunc() {
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Mon May 12 16:07:54 UTC 2025 - 16.5K bytes - Viewed (0) -
src/bytes/bytes.go
return len(s) case n == 1: return bytealg.LastIndexByte(s, sep[0]) case n == len(s): if Equal(s, sep) { return 0 } return -1 case n > len(s): return -1 } return bytealg.LastIndexRabinKarp(s, sep) } // LastIndexByte returns the index of the last instance of c in s, or -1 if c is not present in s. func LastIndexByte(s []byte, c byte) int { return bytealg.LastIndexByte(s, c) }
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Wed Sep 03 14:04:47 UTC 2025 - 35.5K bytes - Viewed (0) -
api/go1.5.txt
pkg archive/zip, method (*Writer) SetOffset(int64) pkg bufio, method (*Reader) Discard(int) (int, error) pkg bufio, method (ReadWriter) Discard(int) (int, error) pkg bytes, func LastIndexByte([]uint8, uint8) int pkg bytes, method (*Buffer) Cap() int pkg bytes, method (*Reader) Size() int64 pkg crypto, const SHA512_224 = 14 pkg crypto, const SHA512_224 Hash pkg crypto, const SHA512_256 = 15 pkg crypto, const SHA512_256 Hash
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Thu Jul 30 21:14:09 UTC 2015 - 46.6K bytes - Viewed (0) -
cmd/data-usage-cache.go
// This is an O(N*N) operation if there is no parent or it cannot be guessed. func (d *dataUsageCache) searchParent(h dataUsageHash) *dataUsageHash { want := h.Key() if idx := strings.LastIndexByte(want, '/'); idx >= 0 { if v := d.find(want[:idx]); v != nil { _, ok := v.Children[want] if ok { found := hashPath(want[:idx]) return &found } } } for k, v := range d.Cache {
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 34.7K bytes - Viewed (0) -
src/archive/zip/reader.go
if err != nil { return nil, err } return rc.(fs.File), nil } func split(name string) (dir, elem string, isDir bool) { name, isDir = strings.CutSuffix(name, "/") i := strings.LastIndexByte(name, '/') if i < 0 { return ".", name, isDir } return name[:i], name[i+1:], isDir } var dotFile = &fileListEntry{name: "./", isDir: true}
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Tue Mar 11 22:19:38 UTC 2025 - 28.4K bytes - Viewed (0) -
docs/debugging/xl-meta/main.go
return '_' } }, file) } if baseName == "" { if strings.HasSuffix(file, "/xl.meta") { baseName = strings.TrimSuffix(file, "/xl.meta") if idx := strings.LastIndexByte(baseName, '/'); idx > 0 { baseName = baseName[idx+1:] } } } err := data.files(func(name string, data []byte) { fn := fmt.Sprintf("%s-%s.data", file, name)
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 40.3K bytes - Viewed (0)