// 	IsBaseTypeName returns true if the type name is one of the base types
760881
func (reg *typeRegistry) IsBaseTypeName(name TypeRef) bool {
	if name != "" {
		lower := strings.ToLower(string(name))
		for _, n := range namesBaseType {
			if lower == strings.ToLower(n) {
				return true
			}
		}
	}
	return false
}
604161
func (g *Plugin) typeName(str string) string {
	return g.gen.TypeName(g.objectNamed(str))
}
757222
func typeName(typeExpr ast.Expr) (string, error) {
	switch typeExpr := typeExpr.(type) {
	case *ast.StarExpr:
		return typeName(typeExpr.X)
	case *ast.Ident:
		return typeExpr.Name, nil
	default:
		return "", fmt.Errorf("expr %+v is not a type expression", typeExpr)
	}
}
623395
func IsTypeNameSupported(t string) bool {
	for imageType, name := range ImageTypes {
		if name == t {
			return IsImageTypeSupportedByVips(imageType).Load
		}
	}
	return false
}
297914
func NewTypeBasedAnnotation(s *Storage, p PunctStrings, e TokenExistential) *TypeBasedAnnotation {
	return &TypeBasedAnnotation{
		Storage:          s,
		PunctStrings:     p,
		TokenExistential: e,
	}
}
219939
func (s *ListInventoryEntriesInput) SetTypeName(v string) *ListInventoryEntriesInput {
	s.TypeName = &v
	return s
}
8953
func isTypeName(x ast.Expr) bool {
	switch t := x.(type) {
	case *ast.BadExpr:
	case *ast.Ident:
	case *ast.SelectorExpr:
		_, isIdent := t.X.(*ast.Ident)
		return isIdent
	default:
		return false // all other nodes are not type names
	}
	return true
}
675738
func baseName(name string) string {
	// First, find the last element
	if i := strings.LastIndex(name, "/"); i >= 0 {
		name = name[i+1:]
	}
	// Now drop the suffix
	if i := strings.LastIndex(name, "."); i >= 0 {
		name = name[0:i]
	}
	return name
}
844560
func (e *ExtensionDescriptor) TypeName() (s []string) {
	name := e.GetName()
	if e.parent == nil {
		// top-level extension
		s = make([]string, 1)
	} else {
		pname := e.parent.TypeName()
		s = make([]string, len(pname)+1)
		copy(s, pname)
	}
	s[len(s)-1] = name
	return s
}
88308
func TypeName(x interface{}) string {
	return strings.ToLower(reflect.Indirect(reflect.ValueOf(x)).Type().Name())
}
472181
func (f *FieldInfo) TypeName() string {
	typeName, err := ExprToTypeName(f.Type)
	if err != nil {
		return fmt.Sprintf("!!%s!!", err.Error())
	}
	return typeName
}
198638
func BaseName(path string) string {
	base := filepath.Base(path)
	ext := filepath.Ext(path)

	re := regexp.MustCompile(ext + "$")
	return re.ReplaceAllString(base, "")
}
1087888
func isNamedType(t types.Type, path, name string) bool {
	n, ok := t.(*types.Named)
	if !ok {
		return false
	}
	obj := n.Obj()
	return obj.Name() == name && isPackage(obj.Pkg(), path)
}
693729
func qualifiedTypeName(t design.DataType) string {
	switch t.Kind() {
	case design.DateTimeKind:
		return "datetime"
	case design.ArrayKind:
		return fmt.Sprintf("%s<%s>", t.Name(), qualifiedTypeName(t.ToArray().ElemType.Type))
	case design.HashKind:
		h := t.ToHash()
		return fmt.Sprintf("%s<%s, %s>",
			t.Name(),
			qualifiedTypeName(h.KeyType.Type),
			qualifiedTypeName(h.ElemType.Type),
		)
	}
	return t.Name()
}
230263
func IsBase64(s string) bool {
	if IsNull(s) {
		return false
	}
	_, err := base64.StdEncoding.DecodeString(s)

	return err == nil
}
805934
func (s *ListResolversInput) SetTypeName(v string) *ListResolversInput {
	s.TypeName = &v
	return s
}
636655
func (reg *typeRegistry) IsStringTypeName(tn TypeRef) bool {
	t := reg.FindType(tn)
	if t == nil {
		return false
	}
	return reg.IsStringType(t)
}