title: C++ Most effective way to grab a substring with a value in the middle of a long string
body: <p>I want to find the most effective way to do something like this:</p>
  <p>A big string containing all kinds of data, for example:</p>
  <pre><code>plushieid:5637372&amp;plushieposition:12757&amp;plushieowner:null&amp;totalplushies:5637373
  </code></pre>
  <p>I want to make a function that would have the input to be, let's say <code>&quot;plushieposition&quot;</code>, and I would have it find and return the string with <code>plushieposition:12757</code>.</p>
  <p>The only way I can think of is find the position of <code>plushieposition</code> and then scan for <code>&amp;</code> and delete the rest. But, is there a cleaner way? If not, what would be the best way to do this in code?</p>
  <p>I'm having a little bit of trouble understanding string scan practices.</p>