Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.06 KB

README.md

File metadata and controls

33 lines (24 loc) · 1.06 KB

goemojipic

Required go 1.16 or above; as embed is used.

go get https://github.com/olachat/goemojipic to install

texts := goemojipic.SplitEmojiString("a 🥰 b")
// texts will a slice of EmojiString
// texts[0].Text == "a " texts[0].IsEmoji == false
// texts[1].Text == "🥰" texts[1].IsEmoji == true
// texts[2].Text == " b" texts[2].IsEmoji == false

imgData, err := goemojipic.GetApplePics("🥰")
// imgData: 72x72 png bytes from Apple's font
// err will not be nil if emoji not found

imgData, err := goemojipic.GetGooglePics("🥰")
// imgData: 72x72 png bytes from Google's font
// err will not be nil if emoji not found

memo

Reference