- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for LastIndexByte (0.26 sec)
-
internal/jwt/parser.go
token = token[:copy(token[:base64BufferSize], tokenStr)] signer, err := ParseUnverifiedStandardClaims(token, claims, *bufp) if err != nil { return err } i := bytes.LastIndexByte(token, '.') if i < 0 { return jwtgo.ErrSignatureInvalid } n, err := base64DecodeBytes(token[i+1:], *bufp) if err != nil { return err } borrow := signer.HashBorrower()
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Sun Sep 28 20:59:21 UTC 2025 - 14.1K bytes - Viewed (0) -
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 Dec 30 11:13:12 UTC 2025 - Last Modified: Mon May 12 16:07:54 UTC 2025 - 16.5K bytes - Viewed (0) -
docs/debugging/inspect/main.go
if *genkey { generateKeys() os.Exit(0) } var privateKeys [][]byte if *keyHex == "" { // Attempt to load private key(s) n := 1 var base, ext string base = *privKeyPath if idx := strings.LastIndexByte(base, '.'); idx != -1 { ext = base[idx:] base = base[:idx] } for { // Automatically read "file.ext", "file-2.ext", "file-3.ext"... fn := base + ext if n > 1 {Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Mon Feb 17 17:09:42 UTC 2025 - 5.7K bytes - Viewed (0) -
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 Dec 28 19:28:13 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 Dec 30 11:13:12 UTC 2025 - Last Modified: Tue Sep 16 16:42:15 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 Dec 30 11:13:12 UTC 2025 - Last Modified: Thu Jul 30 21:14:09 UTC 2015 - 46.6K 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 Dec 30 11:13:12 UTC 2025 - Last Modified: Tue Dec 23 23:54:14 UTC 2025 - 62.9K 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 Dec 28 19:28:13 UTC 2025 - Last Modified: Sun Sep 28 20:59:21 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 Dec 30 11:13:12 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 Dec 28 19:28:13 UTC 2025 - Last Modified: Sun Sep 28 20:59:21 UTC 2025 - 40.4K bytes - Viewed (0)