Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-80694

It's easy to call QString::lastIndexOf with Qt::CaseInsensitive as the "from" argument

    XMLWordPrintable

Details

    • Linux/X11
    • ecc307ff41884d04ffc71d70968891f7903e22f3 (qt/qtbase/dev)

    Description

      When lastIndexOf is used with default option it gives correct results. When used with CaseInsensitive it returns (incorrect) results.

       QString bug= "aa";
       qDebug()<<bug.lastIndexOf("a", Qt::CaseInsensitive);
       qDebug()<<bug.lastIndexOf("a");
       bug= " aa";
       qDebug()<<bug.lastIndexOf("a", Qt::CaseInsensitive);
       qDebug()<<bug.lastIndexOf("a");
      // 0
      // 1
      // -1
      // 2
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mmutz Marc Mutz
            a_denever A Denever
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes