An open API service indexing awesome lists of open source software.

https://github.com/heimskr/formicine

A C++ library for doing things with ANSI.
https://github.com/heimskr/formicine

ansi ansi-escape-codes library

Last synced: about 1 year ago
JSON representation

A C++ library for doing things with ANSI.

Awesome Lists containing this project

README

          

# Formicine
A simple C++ library that wraps ostreams for use with ANSI escapes.

### Example
##### Code
```cpp
#include
#include "ansi.h"

int main(int, char **) {
ansi::ansistream as(std::cout, std::cerr);

as << "Normal text\n";
as << ansi::bold << "Bold text" << ansi::reset << "\n";
as << fg(ansi::green) << "Green text" << ansi::reset << "\n";
as << ansi::underline << "Underlined text,"
<< ansi::italic << " italic+underlined text"
>> ansi::underline << " and just italic text."
<< ansi::reset << "\n";
}
```

##### Output
> Normal text
**Bold text**
Green text
Underlined text, italic+underlined text and just italic text.