Scramble is a c++ header only library which prints a collection of strings in a scrambled manner with random characters. Inspired from this awesome codepen example.
Since this is a header only library add the header file directly in your source code or include directory and use it in your program as shown in the example.
inline void scramble(std::vector<std::string> texts, bool clearAll = true, uint transitionDelay = 100, uint textDelay = 1000);- If
clearAllis set to true, the text printed will be cleared at the end. Default istrue. transitionDelayis time you want in milliseconds between every print. Default is100ms.textDelayis the time you want in milliseconds between end of a text print and the start of the next text printing. Default is1000ms.
#include "scramble-cpp/scramble.hpp"
#include <vector>
int main() {
std::vector<std::string> texts = {"Neo,",
"sooner or later",
"you're going to realize",
"just as I did",
"that there's a difference",
"between knowing the path",
"and walking the path"};
Scramble::scramble(texts, false);
std::cout << "\n";
return 0;
}