EmojiToolkit 17.0.0
dotnet add package EmojiToolkit --version 17.0.0
NuGet\Install-Package EmojiToolkit -Version 17.0.0
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="17.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EmojiToolkit" Version="17.0.0" />
<PackageReference Include="EmojiToolkit" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EmojiToolkit --version 17.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: EmojiToolkit, 17.0.0"
#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.
#:package EmojiToolkit@17.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EmojiToolkit&version=17.0.0
#tool nuget:?package=EmojiToolkit&version=17.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Emoji toolkit
A C# toolkit for working with emoji.
Usage
The static Emoji class has methods for converting emoji into various formats, including conversion to html.
// get an emoji by shortcode
Emoji.Get(":wink:").Raw; // 😉
// get an emoji by ascii equivalent
Emoji.Get(";)").Raw; // 😉
// get an emoji by raw unicode string
Emoji.Get("😉").Name; // winking face
// 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(":wink:"); // 😉
// get the shortcode for a raw unicode string
Emoji.Shortcode("😉"); // :wink:
// get <span> tag for the specified emoji
Emoji.Span(":wink:"); // <span class="emoji" title=":wink:">😉</span>
// 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/1f408.png" />s and <img class="emoji" alt="🐕" title=":dog:" src="/emoji/1f415.png" />s!
// replace emoji shortcodes and raw unicode strings with <span> tags
Emoji.Spanify("it's raining :cat:s and 🐕s!"); // it's raining <span class="emoji" title=":cat:">🐈</span>s and <span class="emoji" title=":dog:">🐕</span>s!
// find emoji by name, category, shortcodes and tags
Emoji.Find("wink").First().Raw; // 😉
// determine whether a string is comprised solely of emoji
Emoji.IsEmoji("🐈🐕"); // true
Emoji.IsEmoji("it's raining 🐈s and 🐕s!"); // false
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- No dependencies.
NuGet packages (3)
Showing the top 3 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. |
|
|
Weavy.Admin
Razor class library containing the management interface for Weavy. |
|
|
Weavy.Api
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.