Help us shape the future of Go! Take the 2026 Go Developer Survey

emoji

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Code generated by build/generate-emoji.go. DO NOT EDIT. Sourced from https://raw.githubusercontent.com/rhysd/gemoji/537ff2d7e0496e9964824f7f73ec7ece88c9765a/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