mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-29 18:27:40 +02:00
Update README.rst
This commit is contained in:
20
README.rst
20
README.rst
@ -145,6 +145,26 @@ Write a file from a single thread:
|
||||
|
||||
This is up to 6x faster than glibc's ``fprintf``.
|
||||
|
||||
Color support:
|
||||
|
||||
.. code:: c++
|
||||
|
||||
#include <fmt/color.h>
|
||||
|
||||
int main() {
|
||||
fmt::print(fg(fmt::color::crimson) | fmt::emphasis::bold,
|
||||
"Hello, {}!\n", "world");
|
||||
fmt::print(fg(fmt::color::floral_white) | bg(fmt::color::slate_gray) |
|
||||
fmt::emphasis::underline, "Hello, {}!\n", "мир");
|
||||
fmt::print(fg(fmt::color::steel_blue) | fmt::emphasis::italic,
|
||||
"Hello, {}!\n", "世界");
|
||||
}
|
||||
|
||||
prints the following on a modern terminal with RGB color support:
|
||||
|
||||
.. image:: https://user-images.githubusercontent.com/
|
||||
576385/50405788-b66e7500-076e-11e9-9592-7324d1f951d8.png
|
||||
|
||||
Benchmarks
|
||||
----------
|
||||
|
||||
|
Reference in New Issue
Block a user