Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.3.2, 5.4.0
-
None
-
OS X 10.9.4
-
4bf0660ae4e695ceb79f585b92dedf00d7757f31
Description
Code
QString str = "rubber30"; QStringRef ref = &str; qDebug()<<str.right(2)<<ref.right(2);
Result
"30" "bber30"
Obeservation
QString counts from the right, QStringRef counts from the left.
"Workaround"
Use QStringRef::mid
qDebug()<<str.right(2)<<ref.mid(ref.length() - 2, 2); "30" "30"