Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 387 for IsString (0.2 sec)

  1. test/named.go

    	asSlice(*&slice)
    	isSlice(*&slice)
    
    	asString(str)
    	isString(str)
    	asString(str + "a")
    	isString(str + "a")
    	asString("a" + str)
    	isString("a" + str)
    	asString(str + str)
    	isString(str + str)
    	str += "a"
    	str += str
    	asString(String('a'))
    	isString(String('a'))
    	asString(String([]byte(slice)))
    	isString(String([]byte(slice)))
    	asString(String([]byte(nil)))
    	isString(String([]byte(nil)))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 4.6K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/basic.go

    	IsInteger
    	IsUnsigned
    	IsFloat
    	IsComplex
    	IsString
    	IsUntyped
    
    	IsOrdered   = IsInteger | IsFloat | IsString
    	IsNumeric   = IsInteger | IsFloat | IsComplex
    	IsConstType = IsBoolean | IsNumeric | IsString
    )
    
    // A Basic represents a basic type.
    type Basic struct {
    	kind BasicKind
    	info BasicInfo
    	name string
    }
    
    // Kind returns the kind of basic type b.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 01 22:17:50 UTC 2021
    - 1.5K bytes
    - Viewed (0)
  3. src/go/types/basic.go

    	IsInteger
    	IsUnsigned
    	IsFloat
    	IsComplex
    	IsString
    	IsUntyped
    
    	IsOrdered   = IsInteger | IsFloat | IsString
    	IsNumeric   = IsInteger | IsFloat | IsComplex
    	IsConstType = IsBoolean | IsNumeric | IsString
    )
    
    // A Basic represents a basic type.
    type Basic struct {
    	kind BasicKind
    	info BasicInfo
    	name string
    }
    
    // Kind returns the kind of basic type b.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  4. test/ken/rob2.go

    	if slist == nil {
    		return ""
    	}
    	var r string
    	if slist.isatom {
    		if slist.isstring {
    			r = slist.String()
    		} else {
    			r = fmt.Sprintf("%v", slist.Integer())
    		}
    	} else {
    		if doparen {
    			r += "("
    		}
    		r += slist.Car().PrintOne(true)
    		if slist.Cdr() != nil {
    			r += " "
    			r += slist.Cdr().PrintOne(false)
    		}
    		if doparen {
    			r += ")"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 24 05:24:24 UTC 2012
    - 4.3K bytes
    - Viewed (0)
  5. src/go/types/conversions.go

    	if isComplex(Vu) && isComplex(Tu) {
    		return true
    	}
    
    	// "V is an integer or a slice of bytes or runes and T is a string type"
    	if (isInteger(Vu) || isBytesOrRunes(Vu)) && isString(Tu) {
    		return true
    	}
    
    	// "V is a string and T is a slice of bytes or runes"
    	if isString(Vu) && isBytesOrRunes(Tu) {
    		return true
    	}
    
    	// package unsafe:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 18:51:00 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/_gen/dec.rules

    (ArraySelect [i] x:(Load <t> ptr mem)) =>
      @x.Block (Load <v.Type> (OffPtr <v.Type.PtrTo()> [t.Elem().Size()*i] ptr) mem)
    
    (StringPtr x:(Load <t> ptr mem)) && t.IsString() => @x.Block (Load <typ.BytePtr> ptr mem)
    (StringLen x:(Load <t> ptr mem)) && t.IsString() => @x.Block (Load <typ.Int>
          (OffPtr <typ.IntPtr> [config.PtrSize] ptr)
          mem)
    
    // NOTE removed must-not-be-SSA condition.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 00:48:31 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  7. operator/pkg/validate/common.go

    	scope.Debugf("validatePortNumberString %v:", val)
    	if !util.IsString(val) {
    		return util.NewErrs(fmt.Errorf("validatePortNumberString(%s) bad type %T, want string", path, val))
    	}
    	if val.(string) == "*" || val.(string) == "" {
    		return nil
    	}
    	intV, err := strconv.ParseInt(val.(string), 10, 32)
    	if err != nil {
    		return util.NewErrs(fmt.Errorf("%s : %s", path, err))
    	}
    	return validatePortNumber(path, intV)
    }
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Aug 10 15:35:03 UTC 2023
    - 11K bytes
    - Viewed (0)
  8. cmd/postpolicyform.go

    	case int64:
    		return v, nil
    	case int:
    		return int64(v), nil
    	case string:
    		i, err := strconv.Atoi(v)
    		return int64(i), err
    	default:
    		return 0, errors.New("Invalid number format")
    	}
    }
    
    // isString - Safely check if val is of type string without causing panic.
    func isString(val interface{}) bool {
    	_, ok := val.(string)
    	return ok
    }
    
    // ContentLengthRange - policy content-length-range field.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon May 06 10:52:41 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/conversions.go

    	if isComplex(Vu) && isComplex(Tu) {
    		return true
    	}
    
    	// "V is an integer or a slice of bytes or runes and T is a string type"
    	if (isInteger(Vu) || isBytesOrRunes(Vu)) && isString(Tu) {
    		return true
    	}
    
    	// "V is a string and T is a slice of bytes or runes"
    	if isString(Vu) && isBytesOrRunes(Tu) {
    		return true
    	}
    
    	// package unsafe:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 18:51:00 UTC 2024
    - 9K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/typecheck/const.go

    // If explicit is true, then conversions from integer to string are
    // also allowed.
    func ConvertVal(v constant.Value, t *types.Type, explicit bool) constant.Value {
    	switch ct := v.Kind(); ct {
    	case constant.Bool:
    		if t.IsBoolean() {
    			return v
    		}
    
    	case constant.String:
    		if t.IsString() {
    			return v
    		}
    
    	case constant.Int:
    		if explicit && t.IsString() {
    			return tostr(v)
    		}
    		fallthrough
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 10.5K bytes
    - Viewed (0)
Back to top