//
// NewStringTypeDef - creates an initialized StringTypeDef instance, returns a pointer to it
//
514727
func NewStringTypeDef(init ...*StringTypeDef) *StringTypeDef {
	var o *StringTypeDef
	if len(init) == 1 {
		o = init[0]
	} else {
		o = new(StringTypeDef)
	}
	return o
}
452652
func NewSharedStringRefTable() *RefTable {
	rt := RefTable{}
	rt.knownStrings = make(map[string]int)
	return &rt
}
446190
func NewStringEqualsIgnoreCaseFunc(key Key, values ...string) (Function, error) {
	sset := set.CreateStringSet(values...)
	if err := validateStringEqualsIgnoreCaseValues(stringEqualsIgnoreCase, key, sset); err != nil {
		return nil, err
	}

	return &stringEqualsIgnoreCaseFunc{key, sset}, nil
}
275368
func newStringNotLikeFunc(key Key, values ValueSet) (Function, error) {
	valueStrings, err := valuesToStringSlice(stringNotLike, values)
	if err != nil {
		return nil, err
	}

	return NewStringNotLikeFunc(key, valueStrings...)
}
55274
func NewStringRule(key string, req bool, opts ...string) (*StringRule, error) {
	// Return error if key is empty
	if key == "" {
		return nil, EmptyKeyError
	}

	var def *string
	if len(opts) > 0 {
		def = &opts[0]
	}

	return &StringRule{
		key:      key,
		required: req,
		default_: def,
	}, nil
}
585513
func NewStringTree(v string, duplicates bool) StringTree {
	return &stringTree{
		container: newNodeContainer(justValue{v}, duplicates),
	}
}
21718
func NewString(name string) *String {
	v := new(String)
	Publish(name, v)
	return v
}
795188
func CFTypeDescription(ref C.CFTypeRef) string {
	typeID := C.CFGetTypeID(ref)
	typeDesc := C.CFCopyTypeIDDescription(typeID)
	defer Release(C.CFTypeRef(typeDesc))
	return CFStringToString(typeDesc)
}
860127
func NewBytesTypeDef(init ...*BytesTypeDef) *BytesTypeDef {
	var o *BytesTypeDef
	if len(init) == 1 {
		o = init[0]
	} else {
		o = new(BytesTypeDef)
	}
	return o
}
1156088
func NewSharedFolderCreateType(Description string) *SharedFolderCreateType {
	s := new(SharedFolderCreateType)
	s.Description = Description
	return s
}
1096106
func NewStringTypeParserToVar(variable *string) *StringTypeParser {
	parser := new(StringTypeParser)
	parser.setter = func(value string) {
		*variable = value
	}
	return parser
}
535839
func NewStringSet(vs ...string) StringSet {
	s := &stringSet{make(map[string]struct{})}
	s.Add(vs...)
	return s
}
549071
func NewSharedLinkShareType(Description string) *SharedLinkShareType {
	s := new(SharedLinkShareType)
	s.Description = Description
	return s
}
805872
func NewSubstringProcessor(index, length int) ProcessorFunc {
	return func(in string) (string, bool) {
		if length < 1 {
			return "", false
		}
		if index < 0 {
			index = 0
		}
		if index >= len(in) {
			return "", true
		}
		out := in[index:]
		if length > len(out) {
			length = len(out)
		}
		return out[:length], true
	}
}
112232
func NewStringOrStringArrayWithString(s string) *StringOrStringArray {
	result := &StringOrStringArray{}
	result.String = &s
	return result
}
450954
func NewString(Expr node.Node) *String {
	return &String{
		FreeFloating: nil,
		Expr:         Expr,
	}
}
1177810
func compileTypedef(file string, src *ast.Typedef) (*TypedefSpec, error) {
	typ, err := compileTypeReference(src.Type)
	if err != nil {
		return nil, err
	}

	annotations, err := compileAnnotations(src.Annotations)
	if err != nil {
		return nil, compileError{
			Target: src.Name,
			Line:   src.Line,
			Reason: err,
		}
	}

	return &TypedefSpec{
		Name:        src.Name,
		File:        file,
		Target:      typ,
		Annotations: annotations,
		Doc:         src.Doc,
	}, nil
}