-
Bug
-
Resolution: Done
-
P2: Important
-
4.6.0
-
None
-
b8b7f98b01d9ad03fecac7a0f593ac5734d7af1d
The example for QByteArray::lastIndexOf() contains:
QByteArray x("crazy azimuths"); QByteArray y("azy"); x.lastIndexOf(y); // returns 6 x.lastIndexOf(y, 6); // returns 6 x.lastIndexOf(y, 5); // returns 2 x.lastIndexOf(y, 1); // returns -1
But it is definitely wrong, since there's only one "azy" substring in the string. The other is "azi", not "azy".
Note that this problem was fixed in QString::lastIndexOf(), but was apparently forgotten for QByteArray.