title: How to do std::string indexof in C++ that returns index of matching string?
body: <p>I'm looking for a string indexof function from the std namespace that returns an integer of a matching string similar to the java function of the same name.   Something like:</p>
  
  <pre><code>std::string word = "bob";
  int matchIndex = getAString().indexOf( word );
  </code></pre>
  
  <p>where getAString() is defined like this:</p>
  
  <pre><code>std::string getAString() { ... }
  </code></pre>