Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for LastIndexByte (0.2 sec)

  1. 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()
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue May 09 07:53:08 GMT 2023
    - 13.9K bytes
    - Viewed (0)
  2. 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() {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  3. 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
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6.9K bytes
    - Viewed (1)
  4. 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)
    }
    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)
  5. 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
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Jul 30 21:14:09 GMT 2015
    - 46.6K bytes
    - Viewed (0)
  6. 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 {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 22 17:49:30 GMT 2024
    - 41.4K bytes
    - Viewed (1)
  7. 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) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
Back to top