Skip to content

Latest commit

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Scramble

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.

How to use it?

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.

inlinevoidscramble(std::vector<std::string> texts, bool clearAll = true, uint transitionDelay = 100, uint textDelay = 1000);
  • If clearAll is set to true, the text printed will be cleared at the end. Default is true.
  • transitionDelay is time you want in milliseconds between every print. Default is 100 ms.
  • textDelay is the time you want in milliseconds between end of a text print and the start of the next text printing. Default is 1000 ms.

Example

#include"scramble-cpp/scramble.hpp"
#include<vector>intmain() {
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";
return0;
}

About

Scramble is a c++ header only library which prints a collection of strings in a scrambled manner with random characters.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages