mirror of
https://github.com/emojisum/emojisum.git
synced 2025-08-02 13:20:27 +00:00
emoji: fix merged unicode
for several of the emoji "words", they are a union of unicode points. Like flags are the two letters together. Female Detective is a number of connected symbols. This representation needs to be alltogether. With this update the unicode points are joined, and require spliting on the "U+". To help with this and be useful as a library there is a function `emoji.CodepointToUnicode(string) string` to do this now. Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
1d0526c5b6
commit
cc9cb5d099
6 changed files with 271 additions and 227 deletions
24
README.md
24
README.md
|
@ -68,3 +68,27 @@ SHA1(main.go)= 🇯🇵 🇬🇧 🤘 🐐 👪 🚀 😺 🏊 🍫 🌵 🍬
|
|||
And like so:
|
||||
|
||||
SHA1(main.go)= 🇯🇵 🇬🇧 🤘 🐐 👪 🚀 😺 🏊 🍫 🌵 🍬 😄 🐝 🏠 🍒 ☁️🍟 🙇 〰️ 🎼
|
||||
|
||||
|
||||
## Library
|
||||
|
||||
Use the golang library to access the mapped emoji words:
|
||||
|
||||
```golang
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/emojisum/emojisum/emoji"
|
||||
)
|
||||
|
||||
func main() {
|
||||
for i := 0; i < 255; i++ {
|
||||
fmt.Printf("%d :\n", i)
|
||||
for _, word := range emoji.Map(byte(i)) {
|
||||
fmt.Printf(" - %s\n", emoji.CodepointToUnicode(word))
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue