hlaueriksson / GEmojiSharp

:octocat: GitHub Emoji for C#, ASP.NET Core and Blazor, dotnet tool for the terminal and PowerToys Run plugin
https://hlaueriksson.github.io/GEmojiSharp/
MIT License
116 stars 8 forks source link

unEmoji #13

Closed cbrandsma-cs closed 2 years ago

cbrandsma-cs commented 2 years ago

Hi,

I like the ability to go from text to an emoji, but can you also do the reverse? (I have a few 3rd party integrations that blow up when they encounter an emoji, but I'd like to keep the meaning around.

hlaueriksson commented 2 years ago

Yes, that's a great idea! An inverted version of Emoji.Emojify. Let's call it Demojify, as the prefix de- can be used to give a word the opposite meaning.

What do you think about this API?

Emoji.Demojify("🎉 initial commit"); // :tada: initial commit
"🎉 initial commit".Demojify(); // :tada: initial commit
hlaueriksson commented 2 years ago

Hi @cbrandsma-cs

With the release of GEmojiSharp 2.0.0, this is now supported:

You can find examples in the unit test: