emoji

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmojiSlice = []Emoji{}

EmojiSlice - Slice of emoji definitions

View Source
var Emojis = map[string]Emoji{}

Emojis - Map of Emoji Runes as Hex keys to their description

Functions

func LookupEmojis

func LookupEmojis(emoji []string) (matches []interface{})

LookupEmojis - Lookup definitions for each emoji in the input

func RemoveAll

func RemoveAll(input string) string

RemoveAll - Remove all emoji

Types

type Emoji

type Emoji struct {
	Key        string `json:"key"`
	Value      string `json:"value"`
	Descriptor string `json:"descriptor"`
}

Emoji - Struct representing Emoji

func InitEmojiSlice

func InitEmojiSlice() []Emoji

InitEmojiSlice

func LookupEmoji

func LookupEmoji(emojiString string) (emoji Emoji, err error)

LookupEmoji - Lookup a single emoji definition

type SearchResult

type SearchResult struct {
	Match       interface{}
	Occurrences int
	Locations   [][]int
}

SearchResult - Occurence of an emoji in a string

func Find

func Find(emojiString string, input string) (result SearchResult, err error)

Find a specific emoji character within a srting

type SearchResults

type SearchResults []SearchResult

SearchResults - The result of a search

func FindAll

func FindAll(input string) (detectedEmojis SearchResults)

FindAll - Find all instances of emoji

func (SearchResults) IndexOf

func (results SearchResults) IndexOf(result interface{}) int

IndexOf - Check to see if search results contains a specific element

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL