Add example

This commit is contained in:
Victor Zverovich 2019-03-16 07:36:27 -07:00
parent fdd0149e71
commit 0fa65cf329

View File

@ -64,6 +64,12 @@ Print ``Hello, world!`` to ``stdout``:
fmt::print("Hello, {}!", "world"); // uses Python-like format string syntax
fmt::printf("Hello, %s!", "world"); // uses printf format string syntax
Format a string and use positional arguments:
.. code:: c++
std::string s = fmt::format("I'd rather be {1} than {0}.", "right", "happy");
Check a format string at compile time:
.. code:: c++