Hi, while writing lots of QString string fiddling code (keyboard macro utility) I feel something tugging at my sleeve:
the upcoming C++20, looking at std::format(), it seems really handy, e.g.:

std::string s = std::format("String '{}' has {} characters\n", string, string.length());

// for a German flavor you can use arg #
std::string s = std::format("{1} Zeichen lang ist die Zeichenkette '{0}'\n", string, string.length());

// lots of formatting options with a ':'|inside the curlies
||std::string s = std::format("{0:b} {0:d} {0:x}", 42);   // s == "101010 42 2a"|
|
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.

Perhaps the time has come to think about a retirement plan for QString?

Rgrds Henry

|
_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to