[Development] Oslo, we have a problem</apollo 13> [char8_t]

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Tue Jul 9 08:28:39 CEST 2019

Il 08/07/19 21:15, Иван Комиссаров ha scritto:
> No, what I’ve actually meant - is it possible to have a free function that takes some string view (QLatin1StringView?) and operates on that view instead of allocating a new string. I’m asking because I’m kinda nooby in UTF and I don’t really know what should happen for non-ascii characters in that case (should such a function just ignore them?).
> Such a function can solve the problem with .toUpper()/toLower() in QByteArray - just remove them and use free function if you’re sure your string is latin1/you don’t care about UTF (which is the currently supported case).

Operating in-place on a view cannot be done: a view, by definition, is 
read only. Having free functions instead of member functions, in order 
to operate on any string-like data, can be done, but they would be a 
very low level API for most users. (That doesn't mean this kind of APIs 
shouldn't be offered.)

Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20190709/0a2744a3/attachment.bin>

More information about the Development mailing list