FairFormattedOutput

Added in version 0.2.0.

Requires CMake 3.12 or later.


On inclusion

Defines variables with ANSI escape codes useful for coloring logs:

CMake variable

ANSI code

CR

ESC[m

CB

ESC[1m

Red

ESC[31m

Green

ESC[32m

Yellow

ESC[33m

Blue

ESC[34m

Magenta

ESC[35m

Cyan

ESC[36m

White

ESC[37m

BRed

ESC[1;31m

BGreen

ESC[1;32m

BYellow

ESC[1;33m

BBlue

ESC[1;34m

BMagenta

ESC[1;35m

BCyan

ESC[1;36m

BWhite

ESC[1;37m

Disable by setting DISABLE_COLOR to true.


fair_pad()

fair_pad(<str> <width> <char> <out> [LEFT] [COLOR])

Pad given <str> to <width> with <char> and populate the result in the variable with name given in <out>. Optionally, pad from the left with LEFT and filter out ANSI color codes with COLOR.