forpelevin / gomoji Goto Github PK
View Code? Open in Web Editor NEWHelpful functions to work with emoji in Golang
License: MIT License
Helpful functions to work with emoji in Golang
License: MIT License
would be great to have a method to replace emojis with their slug
Hi there,
I found if the string including any number, there will always return true, for example:
package main
import (
"fmt"
"github.com/forPelevin/gomoji"
)
func main() {
fmt.Println(gomoji.ContainsEmoji("1"))
// output: true
fmt.Println(gomoji.ContainsEmoji("asdf1"))
// output: true
fmt.Println(gomoji.ContainsEmoji("asdf"))
// output: false
}
๐ป
Hi, this emoji not support
please add support this emoji and other skin tone support
gomoji.ContainsEmoji(๐๐ฟ)
returns false
while
gomoji.ContainsEmoji(๐)
is true
.
I can open a PR to fix this but i see your emoji's are generated by some generator.go file that is not included in this Repo @forPelevin
Thanks for this library. It's very useful for detecting emojis in a fast and efficient manner.
This library is using the emoji api which only supports Emojis up to v13.0 currently. Can we update it to support the latest release https://emojipedia.org/unicode-14.0/ too? Could possibly fetch the API and then statically add the new ones in generator.go
until the Emoji API is updated for this?
Official release: https://unicode.org/emoji/charts-14.0/emoji-released.html
Function ReplaceEmojisWithFunc
unexpectedly returns trimmed version of strings, thus modifying the original string. I would like to know the reason behind this, as it's not the responsibility of this function.
Hi ,I like your project, but it used Generics type, My project's go version is below 1.17.
so .what can I do..
Is there any way the 1.25MB file with emojis. that is loaded into memory, could be made WAY smaller?
Hi @forPelevin, thank you for maintaining the project.
I'm glad that I discovered this project as I find myself needing to work with emojis in Golang ๐
However, one of my use cases involves replacing all emojis within a string with a given rune.
Since I've already worked on it on my own fork, I'll open up a PR against the main branch to see what you think ๐
I have a json like so:
[{"emoji": "๐ฆ", "id": 855898699988205598},
{"emoji": "๐ง", "id": 855908027546468414},
{"emoji": "๐จ", "id": 855910336619872306},
{"emoji": "๐ฉ", "id": 874810967303802891},
{"emoji": "๐ช", "id": 855908176960552971},
{"emoji": "๐ซ", "id": 855895610129645598},
{"emoji": "๐ฌ", "id": 856311847765934080},
{"emoji": "๐ญ", "id": 863577067869437962},
{"emoji": "๐ฎ", "id": 855998416941481984},
{"emoji": "๐ฏ", "id": 872964477518229524},
{"emoji": "๐ฐ", "id": 855901430544203787},
{"emoji": "๐ฑ", "id": 856312436171997214},
{"emoji": "๐ฒ", "id": 892549953568788511},
{"emoji": "๐ณ", "id": 856661374465474590},
{"emoji": "๐ด", "id": 875603397171097660},
{"emoji": "๐ต", "id": 855910253577240628},
{"emoji": "๐ถ", "id": 855895290828423168},
{"emoji": "๐ท", "id": 855896139885445151}]
using
gomoji.CollectAll(s)
Returns an empty slice.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.