title: Is there a way to find the index of every (specified)word in a string and have a way to run a method when it finds the (specified)word
body: <p>I'm trying to find a way to get the index of every specified word in a string:</p>
  
  <p><strong>Input:</strong><br>
  String representing the word to look for</p>
  
  <p><strong>Desired behaviour:</strong><br>
  Run a method and give it the index 
  (Something like a <code>foreach</code>)</p>
  
  <p>I need it to find the word so that I can color the specifed word throughout.</p>
  
  <p><strong>Like this (im using bolding here but imagine it is color)</strong></p>
  
  <p>Input :</p>
  
  <pre><code>string text = "I want to throw my pc off the window. I want to go party" 
  
  string word = "want"
  
  markup(text, word , richtextbox) 
  </code></pre>
  
  <p>Output:</p>
  
  <p>I <strong>want</strong> to throw my pc off the window. I <strong>want</strong> to go party</p>
  
  <hr>
  
  <p>Google didn't give any helpfull results.</p>