- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for indexType (0.23 sec)
-
src/bytes/bytes.go
func ContainsFunc(b []byte, f func(rune) bool) bool { return IndexFunc(b, f) >= 0 } // IndexByte returns the index of the first instance of c in b, or -1 if c is not present in b. func IndexByte(b []byte, c byte) int { return bytealg.IndexByte(b, c) } func indexBytePortable(s []byte, c byte) int { for i, b := range s { if b == c { return i } } return -1
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/bytes/bytes_test.go
b1[j] = 'x' pos := IndexByte(b1, 'x') if pos != j { t.Errorf("IndexByte(%q, 'x') = %v", b1, pos) } b1[j] = 0 pos = IndexByte(b1, 'x') if pos != -1 { t.Errorf("IndexByte(%q, 'x') = %v", b1, pos) } } // different end alignments b1 = b[:i] for j := 0; j < len(b1); j++ { b1[j] = 'x' pos := IndexByte(b1, 'x') if pos != j {
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) -
src/bytes/boundary_test.go
Equal(b[len(b)-i:], b[:i]) } } func TestIndexByteNearPageBoundary(t *testing.T) { t.Parallel() b := dangerousSlice(t) for i := range b { idx := IndexByte(b[i:], 1) if idx != -1 { t.Fatalf("IndexByte(b[%d:])=%d, want -1\n", i, idx) } } } func TestIndexNearPageBoundary(t *testing.T) { t.Parallel() q := dangerousSlice(t) if len(q) > 64 {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Nov 30 20:05:58 GMT 2023 - 2.8K bytes - Viewed (0) -
src/bytes/example_test.go
fmt.Println(bytes.Index([]byte("chicken"), []byte("dmr"))) // Output: // 4 // -1 } func ExampleIndexByte() { fmt.Println(bytes.IndexByte([]byte("chicken"), byte('k'))) fmt.Println(bytes.IndexByte([]byte("chicken"), byte('g'))) // Output: // 4 // -1 } func ExampleIndexFunc() { f := func(c rune) bool { return unicode.Is(unicode.Han, c) }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Mar 04 15:54:40 GMT 2024 - 15K bytes - Viewed (1) -
cmd/metacache-walk.go
forward := "" if len(opts.ForwardTo) > 0 && strings.HasPrefix(opts.ForwardTo, current) { forward = strings.TrimPrefix(opts.ForwardTo, current) // Trim further directories and trailing slash. if idx := strings.IndexByte(forward, '/'); idx > 0 { forward = forward[:idx] } } if contextCanceled(ctx) { return ctx.Err() } if opts.Limit > 0 && objsReturned >= opts.Limit { return nil }
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Mon Apr 15 08:25:46 GMT 2024 - 12.4K bytes - Viewed (0) -
istioctl/pkg/validate/validate.go
case []any: return transformInterfaceArray(v) case map[any]any: return transformInterfaceMap(v) default: return v } } func servicePortPrefixed(n string) bool { i := strings.IndexByte(n, '-') if i >= 0 { n = n[:i] } p := protocol.Parse(n) return p == protocol.Unsupported } func handleNamespace(istioNamespace string) string { if istioNamespace == "" {
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Mon Jan 22 17:58:52 GMT 2024 - 15K bytes - Viewed (0) -
istioctl/pkg/kubeinject/kubeinject.go
// if the revision is "default", render templates with an empty revision if rev == util.DefaultRevisionName { rev = "" } injectorAddress := centralOpts.Xds index := strings.IndexByte(injectorAddress, ':') if index != -1 { injectorAddress = injectorAddress[:index] } injector, meshConfig, err := setupKubeInjectParameters(cliContext, &sidecarTemplate, &valuesConfig, rev, injectorAddress)
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Fri Mar 29 02:29:02 GMT 2024 - 21.6K bytes - Viewed (0) -
cmd/streaming-signature-v4.go
input := bufio.NewScanner(bytes.NewReader(valueBuffer.Bytes())) for input.Scan() { line := strings.TrimSpace(input.Text()) if line == "" { continue } // Find first separator. idx := strings.IndexByte(line, trailerKVSeparator[0]) if idx <= 0 || idx >= len(line) { if cr.debug { fmt.Printf("index, ':' not found in %q\n", line) } return errMalformedEncoding } key := line[:idx]
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 18.2K bytes - Viewed (0) -
cmd/encryption-v1.go
// fail. func DecryptETag(key crypto.ObjectKey, object ObjectInfo) (string, error) { if n := strings.Count(object.ETag, "-"); n > 0 { if n != 1 { return "", errObjectTampered } i := strings.IndexByte(object.ETag, '-') if len(object.ETag[:i]) != 32 { return "", errObjectTampered } if _, err := hex.DecodeString(object.ETag[:32]); err != nil { return "", errObjectTampered }
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 36.5K bytes - Viewed (0)