Base emoji is a Go library which encodes/decodes text to and from emojis. For example, encoding the string "i love peanut butter" to base emoji becomes "👂 🔋 👊 🔦 🎲 🐬 🔋 💾 🐬 🌳 🔥 🐸 🍟 🔋 💫 🐸 🍟 🍟 🐬 🍀".
$ go get github.com/umahmood/baseemoji
$ baseemoji -e "hello world"
💧 🐬 👊 👊 🔦 🔋 💎 🔦 🍀 👊 💵
$ baseemoji -d "💧 🐬 👊 👊 🔦 🔋 💎 🔦 🍀 👊 💵"
hello world
package main
import (
"fmt"
"github.com/umahmood/baseemoji
)
func main() {
e := baseemoji.EncodeString("the quick brown fox jumped over the lazy dog.")
fmt.Println(e)
d := baseemoji.DecodeString(e)
fmt.Println(d)
}
Output:
🍟 💧 🐬 🔋 🏈 🐸 👂 🐕 👓 🔋 💫 🍀 🔦 💎 🔥 🔋 🍩 🔦 👻 🔋 🌍 🐸 👣 💾 🐬 💵 🔋 🔦 🎲 🐬 🍀 🔋 🍟 💧 🐬 🔋 👊 🌳 🌐 🎁 🔋 💵 🔦 🚪
the quick brown fox jumped over the lazy dog.
See the LICENSE file for license rights and limitations (MIT).