// utility function to return only strings
198643
func tostring(i interface{}) string {
	var r string
	switch x := i.(type) {
	case string:
		r = x
	case uint64:
		r = strconv.FormatUint(x, 10)
	case int64:
		r = strconv.FormatInt(x, 10)
	case uint:
		r = strconv.FormatUint(uint64(x), 10)
	case int:
		r = strconv.FormatInt(int64(x), 10)
	default:
		log.Panicf("Could not convert %v %t", x, x)
	}
	return r
}
399619
func (t Triple) Strings() []string {
	acc := make([]string, 0, 4)
	acc = append(acc, string(t.S))
	acc = append(acc, string(t.P))
	acc = append(acc, string(t.O))
	acc = append(acc, string(t.V))
	return acc
}
875305
func (s *Session) GetAll() map[string]interface{} {
	items := make(map[string]interface{}, s.provider.db.Len(s.sid))
	s.mu.RLock()
	s.provider.db.Visit(s.sid, func(key string, value interface{}) {
		items[key] = value
	})
	s.mu.RUnlock()
	return items
}
616513
func OnlyAsciiWords(r rune) bool {
	switch {
	case r >= 'A' && r <= 'Z':
		return false
	case r >= 'a' && r <= 'z':
		return false
	case r == ' ':
		return false
	default:
		return true
	}
}
159814
func VisitObjectStrings(obj interface{}, visitor func(string) (string, bool)) error {
	return visitValue(reflect.ValueOf(obj), visitor)
}
782035
func ToString(i interface{}) string {
	if i == nil {
		return ""
	}

	if s, ok := i.(string); ok {
		return s
	}

	if sl, ok := i.([]string); ok {
		if len(sl) == 1 {
			return sl[0]
		}
	}

	return ""
}
1220299
func (s *stringSet) FindAll(f func(v string) (bool, error)) ([]string, error) {
	found := []string{}
	for v := range s.values {
		ok, err := f(v)
		if err != nil {
			return nil, errors.Annotate(err, ErrFindAll, errorMessages)
		}
		if ok {
			found = append(found, v)
		}
	}
	return found, nil
}
355654
func FindString(s []string, cb func(s string) bool) (string, bool) {
	for _, i := range s {
		result := cb(i)

		if result {
			return i, true
		}
	}

	return "", false
}
968941
func Filter(vs []string, f func(string) bool) []string {
	r := make([]string, 0, len(vs))
	for _, v := range vs {
		if f(v) {
			r = append(r, v)
		}
	}
	return r
}
61845
func (c *Config) GetString(s string) string {
	return c.config.GetString(s)
}
1087908
func (vs Values) Strings() []string {
	ss := make([]string, len(vs))
	for i, v := range vs {
		ss[i] = v.String()
	}
	return ss
}
450159
func getAllDepTypes() []string {
	depTypes := make([]string, 0, len(cmds))
	for depType := range cmds {
		depTypes = append(depTypes, depType)
	}
	sort.Strings(depTypes)
	return depTypes
}
669088
func (v *Xtruct3) GetStringThing() (o string) {
	if v != nil && v.StringThing != nil {
		return *v.StringThing
	}

	return
}
794631
func stringIterator(strs ...string) func(func(string)) {
	return func(callback func(string)) {
		for _, s := range strs {
			callback(s)
		}
	}
}
721566
func ExtractString(s, left, right string) string {
	return strings.Split(strings.Split(s, left)[1], right)[0]
}
1096298
func OnlyContentTypes(types ...string) Option {
	return func(c *options) error {
		if len(types) == 0 {
			c.contentTypes = nil
			return nil
		}
		c.contentTypes = types
		return nil
	}
}
383274
func GetAllPaths(y *simpleyaml.Yaml) ([]string, error)  {
	InitialPath := make([]string, 0)
	AllPaths, err :=  GetAllExistingPaths(y, InitialPath)
	if err != nil {
		return nil, errors.New("Retrieving paths failed")
	}
	return AllPaths, nil
}