Emoji constants for your rusty strings. This crate is inspired by the Go library emoji written by @enescakir.
[dependencies]
emojic = "0.3"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),
);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:") // ๐ฉโ๐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.