Strange Qt Code with strings
c++, qstring, qt
Solution
It's just another (more efficient) way to concatenate `QString`s as described in the manual
QStringBuilder uses expression templates and reimplements the '%' operator so that when you use '%' for string concatenation instead of '+', multiple substring concatenations will be postponed until the final result is about to be assigned to a QString. At this point, the amount of memory required for the final result is known. The memory allocator is then called once to get the required space, and the substrings are copied into it one by one.
Problem
I found my friend's Qt code and he uses the modulo operator on two `QString`s like this: ``` QString result = oneString % twoString; ``` What does it mean?