func (dict *Dictionary) Values() []string { count := dict.Count() if count <= 0 { return nil } values := make([]string, 0, count) var entry *C.AVDictionaryEntry for { entry = C.go_av_dict_next(dict.CAVDictionary, entry) if entry == nil { break } values = append(values, C.GoString(entry.value)) } return values }
func (dict *Dictionary) Map() map[string]string { count := dict.Count() if count <= 0 { return nil } m := make(map[string]string, count) var entry *C.AVDictionaryEntry for { entry = C.go_av_dict_next(dict.CAVDictionary, entry) if entry == nil { break } m[C.GoString(entry.key)] = C.GoString(entry.value) } return m }
func (dict *Dictionary) Keys() []string { count := dict.Count() if count <= 0 { return nil } keys := make([]string, 0, count) var entry *C.AVDictionaryEntry for { entry = C.go_av_dict_next(dict.CAVDictionary, entry) if entry == nil { break } keys = append(keys, C.GoString(entry.key)) } return keys }