Reputation: 21
I want to format 5 strings like:
int half { 32 };
string middle { "[===]" };
string str = fmt::format("{0:<{half}}{1:<}{4}{2:<{half}}{3:<}",
"lpad",
"left",
"rpad",
"right",
middle,
fmt::arg("half", half));
cout << str << endl;
What I want:
lpadleft [===]rpadright
And what I get:
lpad left[===]rpad right
How can I reach desired? Thanks in advance!
Upvotes: 0
Views: 73