title: Fast way to check if String contains a word from a dictionary file?
body: <p>Say I have a file with words:</p>
  
  <ul>
  <li>Apple</li>
  <li>Bacon</li>
  <li>Phone</li>
  <li>And so on, there are about 2000 words.</li>
  </ul>
  
  <p>I then have a string:</p>
  
  <pre><code>I was eating some Apple-bacon when the phoNe rang.
  </code></pre>
  
  <p>I'm trying to find a fast way to result in:</p>
  
  <pre><code>I was eating some *****-***** when the ***** rang.
  </code></pre>
  
  <p>I'm basically trying to censor a chat box. I'm just wondering if there is a better way than iterating through a vector. I'm only using the standard library so a boost hashmap is not a possibility.</p>
  
  <p>I'm using C++ 98.</p>