Commit 1a236c80 authored by Victor Zverovich's avatar Victor Zverovich

Add an example.

parent 9b619782
......@@ -54,6 +54,13 @@ Arguments can be accessed by position and arguments' indices can be repeated:
std::string s = str(fmt::Format("{0}{1}{0}") << "abra" << "cad");
// s == "abracadabra"
Format can be used as a safe portable replacement to ``itoa``:
.. code-block:: c++
fmt::Writer w;
w << 42; // replaces itoa(42, buffer, 10)
An object of any user-defined type for which there is an overloaded
:code:`std::ostream` insertion operator (``operator<<``) can be formatted:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment