mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-23 23:10:04 +00:00
Add another example.
This commit is contained in:
parent
cb458293a3
commit
d3998a2a1f
@ -24,6 +24,11 @@ This prints "Hello, world!" to stdout::
|
||||
|
||||
fmt::Print("Hello, {0}!") << "world";
|
||||
|
||||
Arguments are accessed by position and arguments' indices can be repeated:
|
||||
|
||||
std::string s = str(fmt::Format("{0}{1}{0}") << "abra" << "cad");
|
||||
// s == "abracadabra"
|
||||
|
||||
Motivation
|
||||
----------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user