Update README.rst

This commit is contained in:
Victor Zverovich 2020-07-12 09:55:24 -07:00 committed by GitHub
parent bd903f96ac
commit 5f62954864
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,6 +132,19 @@ Check a format string at compile time:
This gives a compile-time error because ``d`` is an invalid format specifier for This gives a compile-time error because ``d`` is an invalid format specifier for
a string. a string.
Write a file from a single thread:
.. code:: c++
#include <fmt/os.h>
int main() {
auto out = fmt::output_file("guide.txt");
out.print("Don't {}", "Panic");
}
This is up to 6x faster than using ``printf``.
Create your own functions similar to `format Create your own functions similar to `format
<https://fmt.dev/latest/api.html#format>`_ and <https://fmt.dev/latest/api.html#format>`_ and
`print <https://fmt.dev/latest/api.html#print>`_ `print <https://fmt.dev/latest/api.html#print>`_