<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<tt>Hi, while writing lots of QString string fiddling code (keyboard
macro utility) I feel something tugging at my sleeve:<br>
the upcoming C++20, looking at std::format(), it seems really
handy, e.g.:<br>
<br>
std::string s = std::format("String '{}' has {} characters\n",
string, string.length());<br>
<br>
</tt><tt><tt>// for a German flavor you can use arg #<br>
</tt></tt><tt><tt><tt>std::</tt>string s = std::format(</tt></tt><tt><tt><tt>"{1}
Zeichen lang ist die Zeichenkette '{0}'\n"</tt>, string,
string.length());<br>
</tt><br>
// lots of formatting options with a ':'</tt><code> inside the
curlies<br>
</code><code><tt>std::</tt>string s = std::format("{0:b} {0:d}
{0:x}", 42); // s == "101010 42 2a"</code><br>
<code><br>
Using QString::arg() works fine but it's getting harder to ignore
all the new C++ stuff and C++20 looks to be one of the bigger
additions to the language since C++11.<br>
<br>
Perhaps the time has come to think about a retirement plan for
QString?<br>
<br>
Rgrds Henry<br>
<br>
</code>
</body>
</html>