[Interest] String best practice
Vlad Stelmahovsky
vladstelmahovsky at gmail.com
Tue Mar 14 10:48:48 CET 2017
and dont forget coming QStringView
ps. also +1 to the question
On Tue, Mar 14, 2017 at 10:43 AM, Harald Vistnes <harald.vistnes at gmail.com>
wrote:
> Hi,
>
> I'm currently working on reading and parsing large ASCII based text files
> and I am wondering what is the current best practice. There are so many
> classes and macros available, so it can be a bit confusing to know what to
> use when.
>
> QString, QLatin1String, QByteArray, QStringLiteral, QLatin1Literal,
> QByteArrayLiteral, plain C++ string literal, QStringRef, QStringBuilder and
> so on. And then std::string and raw const char* strings.
>
> In my case I want to read a large ASCII file line by line, so I don't need
> unicode. I need to compare a string with a literal, extract substrings and
> convert some strings to numbers.
>
> Should I just use QString all the way, or is it faster to use some other
> classes when you know you don't need unicode?
>
> Any hints on fast file parsing code in Qt itself that I could use as a
> guildeline?
>
> Thanks,
> Harald
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
--
Best regards,
Vlad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170314/ae885731/attachment.html>
More information about the Interest
mailing list