termstyle 1.0.0-pre.3
An open-source C++ header file that enables developers to easily define and apply customizable style presets for terminal outputs such as warnings, infos, and errors.
Loading...
Searching...
No Matches
Using Presets

Classes

class  termstyle::StyledCout
 A class that provides styled output to the standard output stream. More...
 

Functions

void termstyle::print (std::string preset, std::string text="")
 
StyledCout termstyle::style (const std::string &preset)
 

Detailed Description

Content related to using presets.

Function Documentation

◆ print()

void termstyle::print ( std::string preset,
std::string text = "" )

Prints the specified text using the given preset style.

Parameters
presetThe preset style to apply to the text.
textThe text to be printed. If not provided, an empty string will be printed.
Examples
tests/col16.cpp, tests/col256.cpp, tests/colrgb.cpp, and tests/demo.cpp.

◆ style()

StyledCout termstyle::style ( const std::string & preset)

Applies a specific style preset to the output stream.

Parameters
presetThe name of the style preset to apply.
Returns
A StyledCout object that can be used to chain additional styling or output operations.
Examples
tests/col16.cpp, and tests/demo.cpp.