Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 127 for equalFold (0.17 sec)

  1. src/encoding/json/fold_test.go

    		{"DESKey", "aeskey"},
    		{"AES Key", "aeskey"},
    	} {
    		f.Add([]byte(ss[0]), []byte(ss[1]))
    	}
    	equalFold := func(x, y []byte) bool { return string(foldName(x)) == string(foldName(y)) }
    	f.Fuzz(func(t *testing.T, x, y []byte) {
    		got := equalFold(x, y)
    		want := bytes.EqualFold(x, y)
    		if got != want {
    			t.Errorf("equalFold(%q, %q) = %v, want %v", x, y, got, want)
    		}
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 27 17:37:27 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  2. src/net/http/internal/ascii/print.go

    // license that can be found in the LICENSE file.
    
    package ascii
    
    import (
    	"strings"
    	"unicode"
    )
    
    // EqualFold is [strings.EqualFold], ASCII only. It reports whether s and t
    // are equal, ASCII-case-insensitively.
    func EqualFold(s, t string) bool {
    	if len(s) != len(t) {
    		return false
    	}
    	for i := 0; i < len(s); i++ {
    		if lower(s[i]) != lower(t[i]) {
    			return false
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  3. src/cmd/go/internal/str/str.go

    		}
    	}
    	return x
    }
    
    // ToFold returns a string with the property that
    //
    //	strings.EqualFold(s, t) iff ToFold(s) == ToFold(t)
    //
    // This lets us test a large set of strings for fold-equivalent
    // duplicates without making a quadratic number of calls
    // to EqualFold. Note that strings.ToUpper and strings.ToLower
    // do not have the desired property in some corner cases.
    func ToFold(s string) string {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 23 20:08:07 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  4. src/cmd/go/internal/vcs/discovery.go

    				return nil, err
    			}
    			break
    		}
    		if e, ok := t.(xml.StartElement); ok && strings.EqualFold(e.Name.Local, "body") {
    			break
    		}
    		if e, ok := t.(xml.EndElement); ok && strings.EqualFold(e.Name.Local, "head") {
    			break
    		}
    		e, ok := t.(xml.StartElement)
    		if !ok || !strings.EqualFold(e.Name.Local, "meta") {
    			continue
    		}
    		if attrValue(e.Attr, "name") != "go-import" {
    			continue
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 11 18:14:49 UTC 2020
    - 2.6K bytes
    - Viewed (0)
  5. istioctl/pkg/writer/ztunnel/configdump/workload.go

    	}
    
    	if wf.Namespace != "" {
    		if !strings.EqualFold(workload.Namespace, wf.Namespace) {
    			return false
    		}
    	}
    
    	if wf.Address != "" {
    		var find bool
    		for _, ip := range workload.WorkloadIPs {
    			if strings.EqualFold(ip, wf.Address) {
    				find = true
    				break
    			}
    		}
    		if !find {
    			return false
    		}
    	}
    	if wf.Node != "" && !strings.EqualFold(workload.Node, wf.Node) {
    		return false
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 20:18:34 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/third_party/forked/golang/json/fields.go

    	return
    }
    
    // A field represents a single field found in a struct.
    type field struct {
    	name      string
    	nameBytes []byte                 // []byte(name)
    	equalFold func(s, t []byte) bool // bytes.EqualFold or equivalent
    
    	tag bool
    	// index is the sequence of indexes from the containing type fields to this field.
    	// it is a slice because anonymous structs will need multiple navigation steps to correctly
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 25 16:23:43 UTC 2022
    - 13.1K bytes
    - Viewed (0)
  7. pkg/proxy/winkernel/hns_test.go

    	t.Skip("Skipping failing test on Windows.")
    	hns := hns{hcn: newHcnImpl()}
    	Network := mustTestNetwork(t)
    
    	network, err := hns.getNetworkByName(Network.Name)
    	if err != nil {
    		t.Error(err)
    	}
    
    	if !strings.EqualFold(network.id, Network.Id) {
    		t.Errorf("%v does not match %v", network.id, Network.Id)
    	}
    	err = Network.Delete()
    	if err != nil {
    		t.Error(err)
    	}
    }
    
    func TestGetAllEndpointsByNetwork(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  8. src/cmd/go/testdata/script/goroot_executable.txt

    	if err != nil {
    		fmt.Fprintln(os.Stderr, err)
    		os.Exit(1)
    	}
    	want, err = filepath.EvalSymlinks(want)
    	if err != nil {
    		fmt.Fprintln(os.Stderr, err)
    		os.Exit(1)
    	}
    	if !strings.EqualFold(goroot, want) {
    		fmt.Fprintf(os.Stderr, "go env GOROOT:\nhave %s\nwant %s\n", goroot, want)
    		os.Exit(1)
    	}
    	fmt.Fprintf(os.Stderr, "go env GOROOT: %s\n", goroot)
    
    }
    -- check_runtime_goroot.go --
    package main
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 22:16:54 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  9. pkg/proxy/util/linebuffer_test.go

    	for _, testCase := range testCases {
    		t.Run(testCase.name, func(t *testing.T) {
    			testBuffer.Reset()
    			testBuffer.Write(testCase.input...)
    			if want, got := testCase.expected, testBuffer.String(); !strings.EqualFold(want, got) {
    				t.Fatalf("write word is %v\n expected: %q, got: %q", testCase.input, want, got)
    			}
    			if testBuffer.Lines() != 1 {
    				t.Fatalf("expected 1 line, got: %d", testBuffer.Lines())
    			}
    		})
    	}
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 14 12:38:25 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  10. istioctl/pkg/writer/envoy/configdump/endpoint.go

    		return true
    	}
    	if e.Address != "" && !strings.EqualFold(retrieveEndpointAddress(ep), e.Address) {
    		return false
    	}
    	if e.Port != 0 && retrieveEndpointPort(ep) != e.Port {
    		return false
    	}
    	if e.Cluster != "" && !strings.EqualFold(cluster, e.Cluster) {
    		return false
    	}
    	status := retrieveEndpointStatus(ep)
    	if e.Status != "" && !strings.EqualFold(core.HealthStatus_name[int32(status)], e.Status) {
    		return false
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 21 17:42:54 UTC 2024
    - 5.6K bytes
    - Viewed (0)
Back to top