emojic 0.3.0

Emoji constants
Documentation

emojic 😀 🙂 😇

Crates.io Documentation License

Emoji constants for your rusty strings. This crate is inspired by the Go library emoji written by @enescakir.

📦 Cargo.toml

[dependencies]
emojic = "0.3"

🔧 Example

use emojic::Gender;
use emojic::Pair;
use emojic::Tone;
use emojic::flat::*;

println!("Hello {}", WAVING_HAND);
println!(
    "I'm {} from {}",
    TECHNOLOGIST.gender(Gender::Male),
    FLAG_TURKEY
);
println!(
    "Different skin tones default {} light {} dark {}",
    THUMBS_UP,
    OK_HAND.tone(Tone::Light),
    CALL_ME_HAND.tone(Tone::Dark)
);
println!(
    "Multiple skin tones: default: {}, same: {} different: {}",
    PERSON_HOLDING_HANDS,
    PERSON_HOLDING_HANDS.tone(Tone::Medium),
    PERSON_HOLDING_HANDS.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: {}",
    PERSON_TIPPING_HAND.gender(Gender::Male).tone(Tone::Light),
    PERSON_TIPPING_HAND.gender(Gender::Female).tone(Tone::Dark),
);

🖨️ Output

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:

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:

// Iterates all hand emoji: 👏, 🙏, 🤝, 👐, 🤲, 🙌
emojic::grouped::people_and_body::hands::base_emojis()

Finally, it has additional emoji aliases from github/gemoji.

parse_alias(":+1:") // 👍
parse_alias(":100:") // 💯
parse_alias(":woman_astronaut:") // 👩‍🚀

🔭 Examples

For more examples have a look at the examples folder.

📝 License

Licensed under MIT License (LICENSE).

🚧 Contributions

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.