title: How to specify the QString::indexOf method?
body: <p>I have written a source code like:</p>
  
  <pre><code>    int main(int argc, char *argv[]) {
          QString x = "start some text here end";
          QString s = "start";
          QString e = "end";
          int start = x.indexOf(s, 0, Qt::CaseInsensitive); 
          int end = x.indexOf(e, Qt::CaseInsensitive); 
  
          if(start != -1){ // we found it
              QString y = x.mid(start + s.length(), ((end - (start + s.length())) &gt; -1 ? (end - (start + s.length())) : -1)); // if you dont wanna pass in a number less than -1
              or
              QString y = x.mid(start + s.length(), (end - (start + s.length()))); // should not be any issues passing in a number less than -1, still works
  
              qDebug() &lt;&lt; y &lt;&lt; (start + s.length()) &lt;&lt; (end - (start + s.length()));
          }
  
  }
  </code></pre>
  
  <p>The problem is, that in my textfile the word "end" is found very very often. So, is there a way to create a indexOf method that just searchs for the FIRST " QString e = "end" " that appears after the "QString s = "start" " ? greetings</p>