Emoji constants for your rusty strings. This crate is inspired by the Go library emoji written by @enescakir.
toml
[dependencies]
emojic = "0.3"
```rust use emojic::Gender; use emojic::Pair; use emojic::Tone; use emojic::flat::*;
println!("Hello {}", WAVINGHAND); println!( "I'm {} from {}", TECHNOLOGIST.gender(Gender::Male), FLAGTURKEY ); println!( "Different skin tones default {} light {} dark {}", THUMBSUP, OKHAND.tone(Tone::Light), CALLMEHAND.tone(Tone::Dark) ); println!( "Multiple skin tones: default: {}, same: {} different: {}", PERSONHOLDINGHANDS, PERSONHOLDINGHANDS.tone(Tone::Medium), PERSONHOLDINGHANDS.tone((Tone::Light, Tone::Dark)) ); println!( "Different sexes: default: {} male: {}, female: {}", GENIE, GENIE.gender(Gender::Male), GENIE.gender(Gender::Female), ); println!( "Mixing attributes: men & light: {} and women & drak: {}", PERSONTIPPINGHAND.gender(Gender::Male).tone(Tone::Light), PERSONTIPPINGHAND.gender(Gender::Female).tone(Tone::Dark), ); ```
text
Hello 👋
I'm 👨💻 from 🇹🇷
Different skin tones default 👍 light 👌🏻 dark 🤙🏿
Multiple skin tones: default: 🧑🤝🧑, same: 🧑🏽🤝🧑🏽 different: 🧑🏻🤝🧑🏿
Different sexes: default: 🧞 male: 🧞♂️, female: 🧞♀️
Mixing attributes: men & light: 💁🏻♂️ and women & drak: 💁🏿♀️
This crate contains emojis constants based on the Full Emoji List v13.1. Including its categorization:
rust
assert_eq!(
emojic::grouped::people_and_body::hands::OPEN_HANDS, //🤲
emojic::flat::OPEN_HANDS, //🤲
);
As well as iterators to list all the emojis in each group and subgroup:
rust
// Iterates all hand emoji: 👏, 🙏, 🤝, 👐, 🤲, 🙌
emojic::grouped::people_and_body::hands::base_emojis()
Finally, it has additional emoji aliases from github/gemoji.
rust
parse_alias(":+1:") // 👍
parse_alias(":100:") // 💯
parse_alias(":woman_astronaut:") // 👩🚀
For more examples have a look at the examples folder.
Licensed under MIT License (LICENSE).
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the MIT license, shall be licensed as above, without any additional terms or conditions.