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

QString::replace: get match count

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P4: Low
    • None
    • 6.2.6
    • None
    • All

    Description

      It would be nice if the QString::replace methods had an additional optional output parameter to get the number of replacements, or a bool param to know if there is at least one match.

      Now, if I need to know if the string has changed, I have to call the QString::indexOf method before. This is not an optimal solution, because it requires 2 scans of the string.

       

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            puffosauro Fabio Dago
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes