Details
-
Suggestion
-
Resolution: Won't Do
-
Not Evaluated
-
None
-
5.15, 6.5
-
None
Description
While for QString(View)::left() we have
The entire string is returned if n is greater than or equal to size(), or less than zero.
for QString(View)::nid() there is iust one of the out-of-bounds position cases defined:
Returns a null string if the position index exceeds the length of the string.
Given that https://doc.qt.io/qt-5/qstringview.html#mid explicitly states
Until 5.15.1, the behavior was undefined when start < 0 or start > size(). Since 5.15.2, the behavior is compatible with QString::mid().
one is even more puzzled, as one now knows behaviour is compatible, but still undefined?
Wanted:
explicit definition of behaviour, so it could be taken into account for special handling in own code.