gh-emoji

Crates.iogh-emoji
lib.rsgh-emoji
version1.0.8
sourcesrc
created_at2018-12-22 18:05:50.604078
updated_at2023-09-19 15:01:11.802603
descriptionConvert `:emoji:` to Unicode using GitHub's emoji names
homepagehttps://lib.rs/crates/gh-emoji
repositoryhttps://github.com/kornelski/gh-emoji
max_upload_size
id103321
size78,495
Kornel (kornelski)

documentation

README

GitHub emoji for Rust

Full, up-to-date database of GitHub emoji which have Unicode equivalents. Pre-generated and hashed at compile time for fast lookup.

Useful when rendering GitLab/GitHub-flavored Markdown, although this crate does not parse any Markdown itself.

Used by lib.rs website.

Example usage

let emoji = gh_emoji::get("smile");
assert_eq!(emoji, Some("😄"));
let replacer = gh_emoji::Replacer::new();
let text = replacer.replace_all(":crocodile:, see you in a while!");
Commit count: 47

cargo fmt