gitea: code.gitea.io/gitea/modules/emoji Index | Files

package emoji

import "code.gitea.io/gitea/modules/emoji"

Index

Package Files

emoji.go emoji_data.go

Variables

var GemojiData = Gemoji{ /* 3098 elements not displayed */

}

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

func FindEmojiSubmatchIndex Uses

func FindEmojiSubmatchIndex(s string) []int

FindEmojiSubmatchIndex returns index pair of longest emoji in a string

func ReplaceAliases Uses

func ReplaceAliases(s string) string

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

func ReplaceCodes Uses

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:").

type Emoji Uses

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

Emoji represents a single emoji and associated data.

func FromAlias Uses

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 Uses

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 Uses

type Gemoji []Emoji

Gemoji is a set of emoji data.

Package emoji imports 3 packages (graph) and is imported by 9 packages. Updated 2020-07-28. Refresh now. Tools for package owners.