//	This type declares a String containing a whitespace-separated list of values. This Values() method creates and returns a slice of all elements in that list.
349077
func (me Idrefs) Values() (list []Idref) {
	spl := ListValues(string(me))
	list = make([]Idref, len(spl))
	for i, s := range spl {
		list[i].Set(s)
	}
	return
}
28488
func stringSliceContains(slice []string, value string) bool {
	for _, elem := range slice {
		if elem == value {
			return true
		}
	}
	return false
}
927304
func StringSlice(s Interface) []string {
	slice := make([]string, 0)
	for _, item := range s.List() {
		v, ok := item.(string)
		if !ok {
			continue
		}

		slice = append(slice, v)
	}
	return slice
}
425621
func (sm StringMap) Values() []string {
	values := []string{}
	for _, v := range sm {
		values = append(values, v)
	}
	return values
}
350150
func AsStringSlice(s interface{}) ([]string, error) {
	v := reflect.ValueOf(s)
	if v.Kind() != reflect.Slice && v.Kind() != reflect.Array {
		return nil, NewError("autorest", "AsStringSlice", "the value's type is not an array.")
	}
	stringSlice := make([]string, 0, v.Len())

	for i := 0; i < v.Len(); i++ {
		stringSlice = append(stringSlice, v.Index(i).String())
	}
	return stringSlice, nil
}
367969
func NewKeyValuesStrings(key string, values ...string) KeyValues {
	iv := make([]interface{}, len(values))
	for i := 0; i < len(values); i++ {
		iv[i] = values[i]
	}
	return KeyValues{Key: key, Values: iv}
}
681223
func (t ListType) ConvertToStringSlice(value interface{}) ([]string, error) {
	if value == nil {
		return []string{}, nil
	}
	valueList, err := ConvertList(func(fieldType FieldType, value interface{}) (interface{}, error) {
		return fieldType.ConvertToStringSlice(value)
	}, t.ComponentType, value)
	if err != nil {
		return nil, errs.Wrapf(err, "failed to convert list type to string slice")
	}
	if (len(valueList)) == 0 {
		return []string{}, nil
	}
	buffer := make([]string, len(valueList))
	for i := range valueList {
		strValueList := valueList[i].([]string)
		if len(strValueList) != 1 {
			return nil, errs.Errorf("string conversion of base type did not return exactly one value")
		}
		buffer[i] = strValueList[0]
	}
	return buffer, nil
}
704612
func Values(cols []string, v interface{}) ([]interface{}, error) {
	vals := make([]interface{}, len(cols))
	model, err := reflectValue(v)
	if err != nil {
		return nil, fmt.Errorf("values: %v", err)
	}

	fields := loadFields(model)

	for i, col := range cols {
		j, ok := fields[col]
		if !ok {
			return nil, fmt.Errorf("field %T.%q either does not exist or is unexported", v, col)
		}

		vals[i] = model.Field(j).Interface()
	}
	return vals, nil
}
202404
func (v Map) Values() List {
	var valueList List
	for _, value := range v {
		valueList = append(valueList, value)
	}
	return valueList
}
397594
func (s *SinkYARPCServer) Values() []string {
	s.RLock()
	values := make([]string, len(s.values))
	copy(values, s.values)
	s.RUnlock()
	return values
}
102289
func (schema *Schema) arrayOfStringsValue(v interface{}) *[]string {
	switch v := v.(type) {
	default:
		fmt.Printf("arrayOfStringsValue: unexpected type %T\n", v)
	case []string:
		return &v
	case string:
		a := []string{v}
		return &a
	case []interface{}:
		a := make([]string, 0)
		for _, v2 := range v {
			switch v2 := v2.(type) {
			default:
				fmt.Printf("arrayOfStringsValue: unexpected type %T\n", v2)
			case string:
				a = append(a, v2)
			}
		}
		return &a
	}
	return nil
}
1271556
func String(v string) StringOrSlice {
	return StringOrSlice{values: []string{v}, forceEncodeAsArray: false}
}
866888
func splitKeyValueSlice(in []string) map[string]string {
	env := make(map[string]string)
	for _, entry := range in {
		parts := strings.SplitN(entry, "=", 2)
		if len(parts) != 2 {
			parts = append(parts, "")
		}
		env[parts[0]] = parts[1]
	}
	return env

}
456262
func ValueListToSlice(l ValueList) []Value {
	items := make([]Value, 0, l.Size())
	// explicitly ignoring since we know there will not be an error
	_ = l.ForEach(func(v Value) error {
		items = append(items, v)
		return nil
	})
	return items
}
255780
func (s StringSlice) Value() (driver.Value, error) {
	// string escapes.
	// \ => \\\
	// " => \"
	for i, elem := range s {
		s[i] = `"` + strings.Replace(strings.Replace(elem, `\`, `\\\`, -1), `"`, `\"`, -1) + `"`
	}
	return "{" + strings.Join(s, ",") + "}", nil
}
40862
func Strings(data []string) []string {
	sort.Strings(data)
	n := Uniq(sort.StringSlice(data))
	return data[:n]
}
909934
func ValueToString(val Value) (string, bool) {
	if val == nil || val.Err() {
		return "", false
	}
	switch v := val.(type) {
	case StringValue:
		return v.Val(), true
	case TimeValue:
		return fmt.Sprintf("%v", v.Val()), true
	case ByteSliceValue:
		return string(v.Val()), true
	case NumericValue, BoolValue, IntValue:
		return val.ToString(), true
	case Slice:
		// This is controversial, if we are demanding a "ToString"
		// should we:
		// 1)  take first?
		// 2)  append comma separated?
		// 3)  error?
		//
		// Our answer is that we are demanding a scalar string
		// and going to take first.  calling function would have had to do type detection
		// if they wanted something else.
		if v.Len() == 0 {
			return "", false
		}
		v1 := v.SliceValue()[0]
		if v1 == nil {
			return "", false
		}
		return v1.ToString(), true
	}
	return "", false
}