Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
|
|
Source code |
1 |
myQString[i] = myQString[i].toUpper(). |
?
.
? This post has been edited 6 times, last edit by "thrall" (Aug 1st 2010, 10:29pm)
QString:toUpper() will copy, trimmed() is not documented enough to do so, but taking a lock into source code src\corelib\tools\qstring.cpp reveals, that trimmed() returns newly created QString initialized with trimmed data:Unless I'm misunderstanding the documentation, wouldn't
myQString.trimmed().toUpper();
actually produce 2 allocations?
|
|
Source code |
1 |
return QString(s + start, l); |
This post has been edited 2 times, last edit by "thrall" (Aug 3rd 2010, 5:27am)