title: Partial string search in C++
body: <p>Let's say I have a vector of strings called <code>info</code> that reads names of websites from a file one by one sequentially.</p>
  
  <p>This is what I have that searches for names, by the complete name only:</p>
  
  <pre><code>int linearSearch(vector &lt;string&gt; inputs, string search_key){
      for (int x=0; x&lt;inputs.size(); x++){
  
          if (search_key==inputs[x]){
  
              return x;
          }
      }
      return -1;
  }
  </code></pre>
  
  <p>Now what if I wanted to COUNT the amount of websites with a particular word in it?</p>
  
  <p>So if I had</p>
  
  <ol>
  <li>apple.com</li>
  <li>mac.com</li>
  <li>macapple.com</li>
  <li>applepie.com</li>
  <li>potato.com</li>
  </ol>
  
  <p>and I searched for "apple", it would return 3.</p>