// Hashtags returns caption hashtags.
//
// Item media parent must be FeedMedia.
//
// See example: examples/media/hashtags.go
Hashtags returns caption hashtags.

Item media parent must be FeedMedia.

See example: examples/media/hashtags.go
// Hashtags returns caption hashtags . // // Item media parent must be FeedMedia . // // See example : examples / media / hashtags . go
func (item *Item) Hashtags() []Hashtag {
	hsh := make([]Hashtag, 0)
	capt := item.Caption.Text
	for {
		i := strings.IndexByte(capt, '#')
		if i < 0 {
			break
		}
		n := strings.IndexByte(capt[i:], ' ')
		if n < 0 { 
			hsh = append(hsh, Hashtag{Name: capt[i+1:]})
			break
		}
		hsh = append(hsh, Hashtag{Name: capt[i+1 : i+n]})
		capt = capt[n+i:]
	}
	return hsh
}
func ( item * Item ) Hashtags ( ) [ ] Hashtag { hsh := make ( [ ] Hashtag , 0 ) capt := item . Caption . Text for { i := strings . IndexByte ( capt , '#' ) if i < 0 { break } n := strings . IndexByte ( capt [ i : ] , ' ' ) if n < 0 { hsh = append ( hsh , Hashtag { Name : capt [ i + 1 : ] } ) break } hsh = append ( hsh , Hashtag { Name : capt [ i + 1 : i + n ] } ) capt = capt [ n + i : ] } return hsh }
Hashtags returns caption hashtags.
Hashtags returns caption hashtags .
// last hashtag // avoiding '#' character // snipping caption