ANSI escape code text formatter
forest is a loose acronym for format escape terminal. It is a single-header lightweight library for transforming marked-up text into a stream of characters and ANSI escape codes. This text can then be piped out to terminals that support such escape sequences.
forest provides some flexibility in usage of its API:
print_to: Prints to provided
format: Obtains formatted text as a
constexprcode path that formats text to a provided output iterator
literal: compile-time alternative for literals
example/forest-example.cpp contains some samples.
- CMake 3.17+ [optional]
- Copy include/forest/forest.hpp into your build tree, or
- Use CMake:
forestto build tree via
find_package(forest)(must be installed to a path in
- Link to
target_link_libraries(your_project PRIVATE forest::forest)(use
PUBLICinstead to propagate include paths to all dependencies)