title: How do you iterate over a string by character
body: <p>I have a string and I need to scan for every occurrence of "foo" and read all the text following it until a second <code>"</code>. <s>Since Rust does not have a <code>contains</code> function for strings</s>, I need to iterate by characters scanning for it. How would I do this?</p>
  
  <p><strong>Edit</strong>: Rust's <code>&amp;str</code> has a <a href="https://doc.rust-lang.org/std/primitive.str.html#method.contains" rel="noreferrer"><code>contains()</code></a> and <a href="https://doc.rust-lang.org/std/primitive.str.html#method.find" rel="noreferrer"><code>find()</code></a> method.</p>