🥥
is a namespace that extends the functionality of std::cout
. It allows you to easily change text color, text style, and text background color. Additionally, it supports a loading bar feature.
#include "Coconut.h"
int main(int argc, char **argv)
{
coconut::coconut.cout("hello\n", coconut::Color::CYAN);
coconut::coconut.cout(314, coconut::Color::MAGENTA, coconut::Style::UNDERLINE).endl().endl();
coconut::coconut.cout(3.14159, coconut::Color::RED, coconut::Style::BOLD, coconut::Color::YELLOW).endl(3);
}
#include "Coconut.h"
int main(int argc, char **argv)
{
for (int i = 0; i <= 50; ++i)
coconut::coconut.loadingBar(i, coconut::Color::GREEN); // update loading bar
std::this_thread::sleep_for(std::chrono::milliseconds(1000)); // delay
coconut::coconut.loadingBar(90, coconut::Color::GREEN);
std::this_thread::sleep_for(std::chrono::milliseconds(500)); // delay
coconut::coconut.loadingBar(100, coconut::Color::GREEN);
}
git clone https://github.com/kyujinChoi/coconut.git
cd coconut/
mkdir build
cmake ..; make
cd build/
./coconut_example
🍺🍺 THE BEER-WARE LICENSE 🍺🍺
"Looking for Wife...ai! 😋🛜🛜"
, Dongkyu Lee(PigBroA) - https://github.com/PigBroA