- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 358 for IsString (0.19 sec)
-
src/cmd/compile/internal/types2/universe.go
Float32: {Float32, IsFloat, "float32"}, Float64: {Float64, IsFloat, "float64"}, Complex64: {Complex64, IsComplex, "complex64"}, Complex128: {Complex128, IsComplex, "complex128"}, String: {String, IsString, "string"}, UnsafePointer: {UnsafePointer, 0, "Pointer"}, UntypedBool: {UntypedBool, IsBoolean | IsUntyped, "untyped bool"}, UntypedInt: {UntypedInt, IsInteger | IsUntyped, "untyped int"},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 20:08:23 UTC 2024 - 9.1K bytes - Viewed (0) -
src/go/types/universe.go
Float32: {Float32, IsFloat, "float32"}, Float64: {Float64, IsFloat, "float64"}, Complex64: {Complex64, IsComplex, "complex64"}, Complex128: {Complex128, IsComplex, "complex128"}, String: {String, IsString, "string"}, UnsafePointer: {UnsafePointer, 0, "Pointer"}, UntypedBool: {UntypedBool, IsBoolean | IsUntyped, "untyped bool"}, UntypedInt: {UntypedInt, IsInteger | IsUntyped, "untyped int"},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 20:08:23 UTC 2024 - 9.3K bytes - Viewed (0) -
src/cmd/compile/internal/types2/index.go
valid := false length := int64(-1) // valid if >= 0 switch typ := under(x.typ).(type) { case *Basic: if isString(typ) { valid = true if x.mode == constant_ { length = int64(len(constant.StringVal(x.val))) } // an indexed string always yields a byte value // (not a constant) even if the string and the // index are constant x.mode = value x.typ = universeByte // use 'byte' name }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 15 16:16:58 UTC 2023 - 11.5K bytes - Viewed (0) -
src/go/types/index.go
valid := false length := int64(-1) // valid if >= 0 switch typ := under(x.typ).(type) { case *Basic: if isString(typ) { valid = true if x.mode == constant_ { length = int64(len(constant.StringVal(x.val))) } // an indexed string always yields a byte value // (not a constant) even if the string and the // index are constant x.mode = value x.typ = universeByte // use 'byte' name }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 22 16:17:05 UTC 2024 - 11.2K bytes - Viewed (0) -
src/go/types/under.go
// a string, the result is of type (possibly untyped) string. func coreString(t Type) Type { t = Unalias(t) tpar, _ := t.(*TypeParam) if tpar == nil { return under(t) // string or untyped string } var su Type hasString := false if tpar.underIs(func(u Type) bool { if u == nil { return false } if isString(u) { u = NewSlice(universeByte)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 21 22:34:27 UTC 2024 - 2.8K bytes - Viewed (0) -
src/cmd/compile/internal/types2/predicates.go
func isFloat(t Type) bool { return isBasic(t, IsFloat) } func isComplex(t Type) bool { return isBasic(t, IsComplex) } func isNumeric(t Type) bool { return isBasic(t, IsNumeric) } func isString(t Type) bool { return isBasic(t, IsString) } func isIntegerOrFloat(t Type) bool { return isBasic(t, IsInteger|IsFloat) } func isConstType(t Type) bool { return isBasic(t, IsConstType) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 17.5K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/expr.go
base.Errorf("invalid operation: %v (type %v does not support indexing)", n, t) n.SetType(nil) return n case types.TSTRING, types.TARRAY, types.TSLICE: n.Index = indexlit(n.Index) if t.IsString() { n.SetType(types.ByteType) } else { n.SetType(t.Elem()) } why := "string" if t.IsArray() { why = "array" } else if t.IsSlice() { why = "slice" }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:29:45 UTC 2024 - 23.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/timeformat/timeformat.go
func badFormatAt(info *types.Info, e ast.Expr) int { tv, ok := info.Types[e] if !ok { // no type info, assume good return -1 } t, ok := tv.Type.(*types.Basic) // sic, no unalias if !ok || t.Info()&types.IsString == 0 { return -1 } if tv.Value == nil { return -1 } return strings.Index(constant.StringVal(tv.Value), badFormat)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 3.3K bytes - Viewed (0) -
operator/pkg/util/reflect.go
func kindOf(value any) reflect.Kind { if value == nil { return reflect.Invalid } return reflect.TypeOf(value).Kind() } // IsString reports whether value is a string type. func IsString(value any) bool { return kindOf(value) == reflect.String } // IsPtr reports whether value is a ptr type. func IsPtr(value any) bool { return kindOf(value) == reflect.Ptr }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Jul 25 19:30:47 UTC 2022 - 8.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/under.go
// a string, the result is of type (possibly untyped) string. func coreString(t Type) Type { t = Unalias(t) tpar, _ := t.(*TypeParam) if tpar == nil { return under(t) // string or untyped string } var su Type hasString := false if tpar.underIs(func(u Type) bool { if u == nil { return false } if isString(u) { u = NewSlice(universeByte)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 21 22:34:27 UTC 2024 - 2.7K bytes - Viewed (0)