emoji

package
v1.19.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GemojiData = Gemoji{}/* 3359 elements not displayed */

Code generated by build/generate-emoji.go. DO NOT EDIT. Sourced from https://raw.githubusercontent.com/github/gemoji/master/db/emoji.json

Functions

func FindEmojiSubmatchIndex

func FindEmojiSubmatchIndex(s string) []int

FindEmojiSubmatchIndex returns index pair of longest emoji in a string

func ReplaceAliases

func ReplaceAliases(s string) string

ReplaceAliases replaces all aliases of the form ":alias:" with its corresponding unicode value.

func ReplaceCodes

func ReplaceCodes(s string) string

ReplaceCodes replaces all emoji codes with the first corresponding emoji alias (in the form of ":alias:") (ie, "\u2618" will be converted to ":shamrock:").

Types

type Emoji

type Emoji struct {
	Emoji          string
	Description    string
	Aliases        []string
	UnicodeVersion string
	SkinTones      bool
}

Emoji represents a single emoji and associated data.

func FromAlias

func FromAlias(alias string) *Emoji

FromAlias retrieves the emoji data based on the provided alias in the form "alias" or ":alias:" (ie, "shamrock" or ":shamrock:" will return the Gemoji data for "shamrock").

func FromCode

func FromCode(code string) *Emoji

FromCode retrieves the emoji data based on the provided unicode code (ie, "\u2618" will return the Gemoji data for "shamrock").

type Gemoji

type Gemoji []Emoji

Gemoji is a set of emoji data.

Jump to

Keyboard shortcuts

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