title: Loop to keep adding spaces in string?
body: <p>I have the following code:</p>
  
  <pre><code>sHexPic = string_to_hex(sPic);
      sHexPic.insert(sHexPic.begin() + 2,' ');
      sHexPic.insert(2," ");
  </code></pre>
  
  <p>I would like to know how I can put this into a counted loop and add a space after every 2nd character. So far all this does is make this string "35498700" into "35 498700", which in the end I want the final result to be something like "35 49 87 00".</p>
  
  <p>I assume you would have to get the length of the string and the amount of characters in it.</p>
  
  <p>I am trying to achieve this in c++/cli.</p>
  
  <p>Thanks.</p>