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
Col16

Enumerations

enum class  termstyle::Codes : int {
  RESTORE = 0 , BRIGHT = 1 , DIM = 2 , ITALIC = 3 ,
  UNDERLINE = 4 , FLASH = 5 , REVERSE = 7 , HIDDEN = 8 ,
  STRIKE = 9 , BRIGHT_RESET = 22 , DIM_RESET = 22 , ITALIC_RESET = 23 ,
  UNDERLINE_RESET = 24 , FLASH_RESET = 25 , REVERSE_RESET = 27 , HIDDEN_RESET = 28 ,
  STRIKE_RESET = 29 , FOREGROUND_BLACK = 30 , FOREGROUND_RED = 31 , FOREGROUND_GREEN = 32 ,
  FOREGROUND_YELLOW = 33 , FOREGROUND_BLUE = 34 , FOREGROUND_PURPLE = 35 , FOREGROUND_CYAN = 36 ,
  FOREGROUND_WHITE = 37 , FOREGROUND_RESET = 39 , BACKGROUND_BLACK = 40 , BACKGROUND_RED = 41 ,
  BACKGROUND_GREEN = 42 , BACKGROUND_YELLOW = 43 , BACKGROUND_BLUE = 44 , BACKGROUND_PURPLE = 45 ,
  BACKGROUND_CYAN = 46 , BACKGROUND_WHITE = 47 , BACKGROUND_RESET = 49
}
 Enum class for ANSI escape codes.
 

Functions

template<typename T >
std::string termstyle::code2string (const std::vector< T > &codelist) noexcept
 
std::string termstyle::code2string (const Codes &col)
 

Detailed Description

Contents related to Col16.

Function Documentation

◆ code2string() [1/2]

std::string termstyle::code2string ( const Codes & col)

Converts a code to its corresponding string representation.

Parameters
colThe code to convert.
Returns
The string representation of the code.

◆ code2string() [2/2]

template<typename T >
std::string termstyle::code2string ( const std::vector< T > & codelist)
noexcept

Converts a vector of Color16 codes to a string representation.

Parameters
codelistThe vector of codes to convert.
Returns
The string representation of the codes.