Skip to content
/ SFT Public

This repo contains many useful C++ functionsor classes encapsulated in individual headers

License

Notifications You must be signed in to change notification settings

MikeYxxt/SFT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This is a repo which contains many useful CPP headers. Current functions or tools:

Timer

A simple utility class helps track the run time of functions or whole program.

demo

#include "timer.h"
Timer timer(std::cout, "message") //Initialize an instance
timer.span() //Compute the time from the initialization to current

Empty string is the default value of the second argument.

Colorizing text in console

This header currently support both linux and windows platform. The implementation of this file is inspired from doctest

#include "color.h"
std::cout << Color::Cyan << "Hello world!" << std::endl; // Set the color of text to Cyan
std::cout << Color::None; // Reset to default color

Supported colors are listed as below:

Color::Red
Color::Green
Color::Blue
Color::Cyan
Color::Yellow
Color::Grey
Color::LightGrey
Color::BrightRed
Color::BrightGreen
Color::BrightWhite
Color::None // Reset the color

About

This repo contains many useful C++ functionsor classes encapsulated in individual headers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published