Hello,
Ca anyone explain me if indexOf() is bugged or has a meaning I don't really understand?
For example
int i = str.indexOf(pattern, Qt::CaseInsensitive);
cout << i << endl;
QString str = "Splash Screen";
QString pattern = "SCreen";
int i = str.indexOf(pattern, Qt::CaseInsensitive);
cout << i << endl;
To copy to clipboard, switch view to plain text mode
will print -1, I say it should print 7
On the other hand contains() works ok
bool b = str.contains(pattern, Qt::CaseInsensitive);
cout << b << endl;
this will return TRUE
Bookmarks