EmojiToolkit 14.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package EmojiToolkit --version 14.0.1                
NuGet\Install-Package EmojiToolkit -Version 14.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EmojiToolkit" Version="14.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EmojiToolkit --version 14.0.1                
#r "nuget: EmojiToolkit, 14.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install EmojiToolkit as a Cake Addin
#addin nuget:?package=EmojiToolkit&version=14.0.1

// Install EmojiToolkit as a Cake Tool
#tool nuget:?package=EmojiToolkit&version=14.0.1                

Emoji toolkit

Build Nuget

A C# toolkit for working with emoji.

Usage

The static Emoji class has methods for converting emoji into various formats, including conversion to html <img> tags.

// get an emoji by shortcode
Emoji.Get(":smiley:").Raw; // 😃

// get an emoji by raw unicode string
Emoji.Get("😃").Name; // grinning face with big eyes

// get the ascii equivalent of an emoji
Emoji.Ascii("😉"); // ;)

// get <img> tag for the specified emoji
Emoji.Image(":wink:"); // <img class="emoji" alt="😉" title=":wink:" src="/emoji/1f609.png" />

// get the raw unicode equivalent for an emoji shortcode
Emoji.Raw(":smiley:"); // 😃

// get the shortcode for a raw unicode string
Emoji.Shortcode("😃"); // :smiley:

// replace emoji shortcodes and raw unicode strings with their ascii equivalents
Emoji.Asciify("😉 :wink:"); // ;) ;)

// replace emoji shortcodes with raw unicode strings.
Emoji.Emojify("it's raining :cat:s and :dog:s!"); // it's raining ðŸąs and ðŸķs!

// replace raw unicode strings with emoji shortcodes
Emoji.Demojify("it's raining ðŸąs and ðŸķs!"); // it's raining :cat:s and :dog:s!

// replace emoji shortcodes and raw unicode strings with <img> tags
Emoji.Imagify("it's raining :cat:s and ðŸķs!"); // it's raining <img class="emoji" alt="ðŸą" title=":cat:" src="/emoji/1f431.png" />s and <img class="emoji" alt="ðŸķ" title=":dog:" src="/emoji/1f436.png" />s! 

// find emoji by name, category, shortcodes and tags
Emoji.Find("smile").First().Raw; // 😃

// determine whether a string is comprised solely of emoji
Emoji.IsEmoji("ðŸąðŸķ"); // true
Emoji.IsEmoji("it's raining ðŸąs and ðŸķs!"); // false

Notes

The full list of emoji is located in Emoji.generated.cs and was generated from emoji.json, which was originally downloaded from https://github.com/joypixels/emoji-toolkit/blob/master/emoji.json.

To re-generate the file execute dotnet run from the \src\Generator folder:

\src\Generator> dotnet run

Release checklist

  1. Update VersionPrefix in Directory.build.props.
  2. Commit and push the changes.
  3. Create a release and tag it with the version number. This triggers publish.yml which publishes a nuget package to https://www.nuget.org/.

Misc resources

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on EmojiToolkit:

Package Downloads
Weavy.Core

A class library containing core business logic, data access and utility methods required by Weavy.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
15.1.0 207 7/22/2024
15.0.1 749 10/5/2023
15.0.0 145 10/5/2023
14.1.0 334 1/19/2023
14.0.1 270 1/18/2023
14.0.0 289 1/10/2023