- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for LastIndexByte (0.04 sec)
-
cmd/api-headers.go
lc.SetPredictionHeaders(w, objInfo.ToLifecycleOpts()) } if v, ok := objInfo.UserDefined[ReservedMetadataPrefix+"compression"]; ok { if i := strings.LastIndexByte(v, '/'); i >= 0 { v = v[i+1:] } w.Header()[xhttp.MinIOCompressed] = []string{v} } return nil } // needsEncoding reports whether s contains any bytes that need to be encoded.
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 8.6K 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) -
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/bytes/bytes_test.go
{"zabcdefabcdef", "z", 0}, // first byte {"a☺b☻c☹d", "b", len("a☺")}, // non-ascii } for _, test := range testCases { actual := LastIndexByte([]byte(test.a), test.b[0]) if actual != test.i { t.Errorf("LastIndexByte(%q,%c) = %v; want %v", test.a, test.b[0], actual, test.i) } } } // test a larger buffer with different sizes and alignments func TestIndexByteBig(t *testing.T) {
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Mon Jul 28 18:13:58 UTC 2025 - 62.9K 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)