Welcome to CppMoji. CppMoji is a C++ library that replaces emoji shortcodes in a string with unicode emojis. Throughout the project, the creators attempted to explore modern C++ constructs - including string_views, parallel for_each loops, and structured bindings.
The library obtains the emojis from the Emojidex API.
#include "cppmoji.h"
int main() {
std::string plain_text = "Just :clap: :clap: because :eyes: the :clap: dude :man: has :clap: long :clap: hair :haircut: doesn't :angry: make :thumbsdown: it :100: edgy :microphone: :clap: :clap: :clap:";
std::string emojised_text = emojiseText(plain_text);
// Just 👏 👏 because 👀 the 👏 dude 👨 has 👏 long 👏 hair 💇 doesn't 😠 make 👎 it 💯 edgy 🎤 👏 👏 👏
return 0;
}
- Parallelize calls to the API using a C++ 17 parallel for_each loop, after it's implemented by clang.
- Clean up code and add comments.
- Assemble the code into a single portable *.hpp file.
- Switch from using narrow strings to using std::wstrings to prevent inconsistent parsing and display for unicode emojis.
To become a contributor, send an email to me.
emojicpp (https://github.com/99xt/emojicpp)