Skip to content

pk0267/cppmoji

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Emojis for Modern C++ 😊

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.

Dependencies

  1. The C++ Requests Library
  2. JSON for Modern C++
  3. Libcurl

Usage

#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;
}

Future Plans

  1. Parallelize calls to the API using a C++ 17 parallel for_each loop, after it's implemented by clang.
  2. Clean up code and add comments.
  3. Assemble the code into a single portable *.hpp file.
  4. Switch from using narrow strings to using std::wstrings to prevent inconsistent parsing and display for unicode emojis.

Contributors

Pooja

To become a contributor, send an email to me.

Inspiration

emojicpp (https://github.com/99xt/emojicpp)

About

CppMoji is a C++ library that replaces emoji shortcodes in a string with unicode emojis.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors