Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for lowerAscii (0.19 sec)

  1. src/runtime/env_posix.go

    func envKeyEqual(a, b string) bool {
    	if GOOS == "windows" { // case insensitive
    		for i := 0; i < len(a); i++ {
    			ca, cb := a[i], b[i]
    			if ca == cb || lowerASCII(ca) == lowerASCII(cb) {
    				continue
    			}
    			return false
    		}
    		return true
    	}
    	return a == b
    }
    
    func lowerASCII(c byte) byte {
    	if 'A' <= c && c <= 'Z' {
    		return c + ('a' - 'A')
    	}
    	return c
    }
    
    // _cgo_setenv should be an internal detail,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:47 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  2. src/vendor/golang.org/x/net/http/httpguts/httplex.go

    		if tokenEqual(trimOWS(v[:comma]), token) {
    			return true
    		}
    		v = v[comma+1:]
    	}
    	return tokenEqual(trimOWS(v), token)
    }
    
    // lowerASCII returns the ASCII lowercase version of b.
    func lowerASCII(b byte) byte {
    	if 'A' <= b && b <= 'Z' {
    		return b + ('a' - 'A')
    	}
    	return b
    }
    
    // tokenEqual reports whether t1 and t2 are equal, ASCII case-insensitively.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  3. src/net/parse.go

    func lowerASCIIBytes(x []byte) {
    	for i, b := range x {
    		if 'A' <= b && b <= 'Z' {
    			x[i] += 'a' - 'A'
    		}
    	}
    }
    
    // lowerASCII returns the ASCII lowercase version of b.
    func lowerASCII(b byte) byte {
    	if 'A' <= b && b <= 'Z' {
    		return b + ('a' - 'A')
    	}
    	return b
    }
    
    // trimSpace returns x without any leading or trailing ASCII whitespace.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 14:00:54 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/cel/library/cost_test.go

    		expectRuntimeCost  uint64
    	}{
    		{
    			name:               "lowerAscii",
    			expr:               "'ABCDEFGHIJ abcdefghij'.lowerAscii()",
    			expectEsimatedCost: checker.CostEstimate{Min: 3, Max: 3},
    			expectRuntimeCost:  3,
    		},
    		{
    			name:               "lowerAsciiEquals",
    			expr:               "'ABCDEFGHIJ abcdefghij'.lowerAscii() == 'abcdefghij ABCDEFGHIJ'.lowerAscii()",
    			expectEsimatedCost: checker.CostEstimate{Min: 7, Max: 9},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 17:22:44 UTC 2024
    - 40.8K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/celcoststability_test.go

    				"self.val1.substring(4, 10).trim() == 'takes'":     6,
    				"self.val1.upperAscii() == 'ROOK TAKES 👑'":         6,
    				"self.val1.lowerAscii() == 'rook takes 👑'":         6,
    				"self.val1.lowerAscii() == self.val1.lowerAscii()": 10,
    				// strings version 2
    				"'%d %s %f %s %s'.format([1, 'abc', 1.0, duration('1m'), timestamp('2000-01-01T00:00:00.000Z')]) == '1 abc 1.000000 60s 2000-01-01T00:00:00Z'": 6,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 19:20:16 UTC 2024
    - 80.2K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/cel/library/cost.go

    		var cost uint64
    		if len(args) > 0 {
    			cost += traversalCost(args[0]) // these O(n) operations all cost roughly the cost of a single traversal
    		}
    		return &cost
    	case "url", "lowerAscii", "upperAscii", "substring", "trim":
    		if len(args) >= 1 {
    			cost := uint64(math.Ceil(float64(actualSize(args[0])) * common.StringTraversalCostFactor))
    			return &cost
    		}
    	case "replace", "split":
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 17:22:44 UTC 2024
    - 20.6K bytes
    - Viewed (0)
  7. src/net/cgo_unix.go

    	if err != nil {
    		return 0, &DNSError{Err: err.Error(), Name: network + "/" + service}
    	}
    	// Lowercase the C service name.
    	for i, b := range cservice[:len(service)] {
    		cservice[i] = lowerASCII(b)
    	}
    	var res *_C_struct_addrinfo
    	gerrno, err := _C_getaddrinfo(nil, (*_C_char)(unsafe.Pointer(&cservice[0])), hints, &res)
    	if gerrno != 0 {
    		switch gerrno {
    		case _C_EAI_SYSTEM:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:23:45 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/compilation_test.go

    			expectedCalcCost: 629160,
    			setMaxElements:   10,
    			expectedSetCost:  22,
    		},
    		{
    			name: "extended library lowerAscii",
    			schemaGenerator: func(max *int64) *schema.Structural {
    				strType := withMaxLength(primitiveType("string", ""), max)
    				strType = withRule(strType, "self.lowerAscii() == 'lower!'")
    				return &strType
    			},
    			expectedCalcCost: 314575,
    			setMaxElements:   10,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 16 20:13:14 UTC 2024
    - 51.5K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation_test.go

    									Type:      "string",
    									MaxLength: pointer.Int64(5),
    								},
    							},
    							XValidations: apiextensions.ValidationRules{
    								{
    									Rule: "self.all(x, self.exists_one(y, x.lowerAscii() == y.lowerAscii()))",
    								},
    							},
    						},
    					},
    				},
    			},
    		},
    		{
    			name: "x-kubernetes-validations rule invalidated by messageExpression exceeding per-CRD estimated cost limit",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 349.4K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation_test.go

    				"self.val1.substring(5) == 'takes 👑'",
    				"self.val1.substring(0, 4) == 'Rook'",
    				"self.val1.substring(4, 10).trim() == 'takes'",
    				"self.val1.upperAscii() == 'ROOK TAKES 👑'",
    				"self.val1.lowerAscii() == 'rook takes 👑'",
    
    				"'%d %s %f %s %s'.format([1, 'abc', 1.0, duration('1m'), timestamp('2000-01-01T00:00:00.000Z')]) == '1 abc 1.000000 60s 2000-01-01T00:00:00Z'",
    				"'%e'.format([3.14]) == '3.140000 × 10⁰⁰'",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 17:14:10 UTC 2024
    - 159.9K bytes
    - Viewed (0)
Back to top