Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeriveEmojisFromText ¶
DeriveEmojisFromText takes a plaintext (ie., not html-formatted) text, and applies a regex to it to return a deduplicated list of emojis used in that text, without the surrounding `::`
func DeriveHashtagsFromText ¶
DeriveHashtagsFromText takes a plaintext (ie., not html-formatted) text, and applies a regex to it to return a deduplicated list of hashtags used in that text, without the leading #. The case of the returned tags will be lowered, for consistency.
func DeriveMentionsFromText ¶
DeriveMentionsFromText takes a plaintext (ie., not html-formatted) text, and applies a regex to it to return a deduplicated list of accounts mentioned in that text.
It will look for fully-qualified account names in the form "@user@example.org". or the form "@username" for local users.
func ExtractMentionParts ¶
ExtractMentionParts extracts the username test_user and the domain example.org from a mention string like @test_user@example.org.
If nothing is matched, it will return an error.
func UniqueStrings ¶
UniqueStrings returns a deduplicated version of a given string slice.
Types ¶
This section is empty.