[Development] Wither QString?

Alexander Nassian nassian at bitshift-dynamics.com
Fri Oct 18 02:41:15 CEST 2019


C++ hasn‘t even proper Unicode handling integrated. std::string is a mess in my opinion.

Beste Grüße / Best regards,
Alexander Nassian

> Am 18.10.2019 um 02:30 schrieb Henry Skoglund <henry at tungware.se>:
> 
>  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 at qt-project.org
> https://lists.qt-project.org/listinfo/development

-- 













—


bitshift dynamics GmbH
Neudorfer Str. 1, 79541 Lörrach

Registergericht: Amtsgericht Freiburg i. Breisgau, HRB 713747

Geschäftsführer: Alexander Nassian, Markus Pfaffinger



http://www.bitshift-dynamics.de <http://www.bitshift-dynamics.de/>


Zentrale: +49 762158673 - 0
Fax: +49 7621 58673 - 90


Allgemeine Anfragen: 
info at bitshift-dynamics.com <mailto:info at bitshift-dynamics.com>
Technischer 
Support: support at bitshift-dynamics.com 
<mailto:support at bitshift-dynamics.com>
Buchhaltung: 
invoice at bitshift-dynamics.com <mailto:invoice at bitshift-dynamics.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20191018/bf6c6eff/attachment.html>


More information about the Development mailing list