// GetString gets the specified string attribute.
185948
func (c ConfigAttributes) GetString(attrName string, defaultValue string) string {
	if val, ok := c[attrName]; ok {
		return val.(string)
	}
	return defaultValue
}
887542
func (e *GameEvent) GetString(name string) (string, error) {
	// Get the key from the message
	k, err := e.getEventKey(name)
	if err != nil {
		return "", err
	}

	// Make sure it's a string.
	if k.GetType() != gameEventTypeString {
		return "", _errorf("field %s: expected string, got %s", name, gameEventTypeNames[k.GetType()])
	}

	return k.GetValString(), nil
}
19650
func (v *ListTypeVersioningV2) GetStrings() (o []string) {
	if v != nil && v.Strings != nil {
		return v.Strings
	}

	return
}
429617
func (endpoints EndpointList) GetString(i int) string {
	if i < 0 || i >= len(endpoints) {
		return ""
	}
	return endpoints[i].String()
}
653164
func (v Value) GetString() (string, error) {
	var err error

	if v.t != reflect.String {
		err = fmt.Errorf("not a string Value")
	}

	return v.s, err
}
1134579
func (q Quad) GetString(d Direction) string {
	switch d {
	case Subject:
		return StringOf(q.Subject)
	case Predicate:
		return StringOf(q.Predicate)
	case Object:
		return StringOf(q.Object)
	case Label:
		return StringOf(q.Label)
	default:
		panic(d.String())
	}
}
376564
func (config *Config) GetString(key string, defaultValue string) (string, error) {
	value, err := config.Get(key, defaultValue)
	if err != nil {
		return defaultValue, err
	}
	if result, ok := value.(string); ok {
		return result, nil
	}
	return defaultValue, &ValueTypeError{key: key, value: value, message: "Value is not a string."}
}
189720
func (s *Session) GetString(ctx context.Context, key string) string {
	val := s.Get(ctx, key)
	str, ok := val.(string)
	if !ok {
		return ""
	}
	return str
}
1267920
func (p Params) GetString(key string) string {
	v, ok := p[key]
	if !ok {
		return ""
	}
	s, _ := v.(string)
	return s
}
78688
func (d *Context) GetString(i int) string {
	if s := C.duk_get_string(d.duk_context, C.duk_idx_t(i)); s != nil {
		return C.GoString(s)
	}
	return ""
}
204015
func (meta Metadata) TryGetValueString(key string) (string, bool) {
	data, exists := meta.TryGetValue(key)
	return string(data), exists
}
662602
func (a Attributes) Get(key string) string {
	if a == nil {
		return ""
	}
	v := a[key]
	if len(v) == 0 {
		return ""
	}
	return v[0]
}
175721
func GetRandomString(length int) string {
	b := make([]byte, length)

	for i := range b {
		c := rand.Intn(allowedCharsSize)
		b[i] = allowedChars[c]
	}

	return string(b)
}
482983
func (c *Context) GetString(key interface{}) string {
	store := c.getStore()
	if value, ok := store[key]; ok {
		if typed, ok := value.(string); ok {
			return typed
		}
	}
	if c.Parent != nil {
		return c.Parent.GetString(key)
	}
	return ""
}
742725
func (c *PackageFile) GetString(header, tag int) string {
	if c == nil || header >= len(c.Headers) {
		return ""
	}
	return c.Headers[header].Indexes.StringByTag(tag)
}
407813
func (list *List) GetString(idx int) (string, error) {
	value, err := list.Get(idx)
	if err != nil {
		return "", err
	}

	switch value.(type) {
	case *Primative:
		return value.(*Primative).AsString()
	}

	return "", errors.New("could not convert non-primative value to string")
}
1205245
func (meta Metadata) GetValueString(key string) string {
	return string(meta.GetValue(key))
}