emoji

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: MIT Imports: 4 Imported by: 2

Documentation ยถ

Index ยถ

Constants ยถ

View Source
const (
	ID   = "๐Ÿ†”"
	Key  = "๐Ÿ”‘"
	Box  = "๐Ÿ“ฆ"
	Gift = "๐ŸŽ"
	Flag = "๐Ÿšฉ"
	Tool = "๐Ÿ”ง"
	GUN  = "๐Ÿ”ซ"
	Ding = "๐Ÿ“Œ"
	Stop = "๐Ÿšซ"

	DOC     = "๐Ÿ“„"
	DIR     = "๐Ÿ“‚"
	BOOK    = "๐Ÿ“”"
	RECYCLE = "โ™ป"

	EDIT  = "โœ"
	SMILE = "๐Ÿ˜Š"
	LAUGH = "๐Ÿ˜†"
	LIKE  = "๐Ÿ˜"
	ANGER = "๐Ÿ˜ก"
	HAPPY = "๐Ÿ˜€"
	DOZE  = "๐Ÿ˜ด"

	OK     = "๐Ÿ‘Œ"
	YES    = "โœŒ"
	NO     = "โœ‹"
	PRAISE = "๐Ÿ‘"
	TREAD  = "๐Ÿ‘Ž"
	STEP   = "๐Ÿพ"

	UP    = "๐Ÿ‘†"
	DOWN  = "๐Ÿ‘‡"
	LEFT  = "๐Ÿ‘ˆ"
	RIGHT = "๐Ÿ‘‰"

	TopArrow  = "๐Ÿ”"
	BackArrow = "๐Ÿ”™"
	SoonArrow = "๐Ÿ”œ"

	FIRE  = "๐Ÿ”ฅ"
	SNOW  = "โ„"
	WATER = "๐Ÿ’ง"
	FLASH = "โšก"

	Eye = "๐Ÿ‘€"

	HeartStar   = "๐Ÿ’–"
	HeartBreak  = "๐Ÿ’”"
	HeartRed    = "โค๏ธ"
	HeartOrange = "๐Ÿงก"
	HeartYellow = "๐Ÿ’›"
	HeartGreen  = "๐Ÿ’š"

	// SUC ๐Ÿ”โž•โž–๐ŸŽถโœ–๏ธ๐Ÿ’ฒโœ”๏ธโ˜‘๏ธ๐Ÿ”˜๐ŸŸข๐ŸŸก๐Ÿ”ต๐ŸŸฃ๐ŸŸ โšช๏ธ๐ŸŸฉ๐Ÿ”ฒ๐Ÿ”ณ
	SUC  = "โœ…"
	FAIL = "โŒ"

	// TickSGreen square green tick ๆ–นๆก†็ปฟ่‰ฒๅ‹พ
	TickSGreen = "โœ…"
	// TickBlack black tick
	TickBlack = "โœ”๏ธ"
	// TickSBlack square black tick
	TickSBlack = "โ˜‘๏ธ"
	// BtnSingle ๅ•้€‰ๆŒ‰้’ฎ
	BtnSingle = "๐Ÿ”˜"
	BtnSquare = "๐Ÿ”ฒ"

	// CircleSRed red solid circle ็บข่‰ฒๅฎžๅฟƒๅœ†ๅœˆ
	CircleSRed = "๐Ÿ”ด"
	// CircleSGreen green solid circle ็ปฟ่‰ฒๅฎžๅฟƒๅœ†ๅœˆ
	CircleSGreen = "๐ŸŸข"
	// CircleSYellow yellow solid circle ็ปฟ่‰ฒๅฎžๅฟƒๅœ†ๅœˆ
	CircleSYellow = "๐ŸŸก"

	Warning  = "โš ๏ธ"
	QUESTION = "โ“"
	// RedExcMark ็บข่‰ฒๆ„Ÿๅนๅท
	RedExcMark = "โ—"
	// RedExcMarkD red double exclamation mark ็บข่‰ฒๅŒๆ„Ÿๅนๅท
	RedExcMarkD = "โ€ผ๏ธ"

	// Points100 100ๅˆ†็ฌฆๅท
	Points100 = "๐Ÿ’ฏ"
	// Recycling ๅ›žๆ”ถๆ ‡ๅฟ—
	Recycling = "โ™ป๏ธ"

	Music1 = "๐ŸŽต"
	Music2 = "๐ŸŽถ"

	Clock  = "โฐ"
	Clock4 = "๐Ÿ•“"

	Car = "๐Ÿš•"

	Tree   = "๐ŸŒฒ"
	Flower = "๐ŸŒบ"

	Pear  = "๐Ÿ"
	Apple = "๐ŸŽ"

	Elephant = "๐Ÿ˜"
	Whale    = "๐Ÿณ"

	Sun   = "๐ŸŒž"
	Star  = "โญ"
	Moon  = "๐ŸŒœ"
	Earth = "๐ŸŒ"
)

some simple emoji chars

Variables ยถ

This section is empty.

Functions ยถ

func Decode ยถ

func Decode(s string) string

Decode a string, convert unicode to emoji chat Usage:

str := Decode("a msg [\u1f496]")

func Emoji ยถ

func Emoji(name string) string

Emoji is alias of the GetByName()

func Encode ยถ

func Encode(s string) string

Encode a string, convert emoji chat to unicode string

func FromUnicode ยถ

func FromUnicode(s string) string

FromUnicode unicode string to emoji string Usage:

emoji := FromUnicode("\U0001f496")

func GetByName ยถ

func GetByName(name string) string

GetByName returns the unicode value for the given emoji name. If the specified emoji does not exist, will returns the input string.

func Render ยถ

func Render(str string) string

Render a string, parse emoji name, returns rendered string. Usage:

msg := Render("a :smile: message")
fmt.Println(msg)
func Search(kw string, limits ...int) (ret map[string]string)

Search emoji by name

func ToUnicode ยถ

func ToUnicode(emoji string, prefix ...string) string

ToUnicode unicode string to emoji string Usage:

unicode := ToUnicode("๐Ÿ’–")
fmt.Print(unicode) // "1f496"
// with prefix
unicode := ToUnicode("๐Ÿ’–", "\U000") // "\U0001f496"
fmt.Print(unicode) // "๐Ÿ’–"

Types ยถ

This section is empty.

Jump to

Keyboard shortcuts

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