title: Format specific section of String
body: <p>I have a <code>String</code>: <code>a%sb%sc%s</code>. I need to format <code>b</code> before I format <code>a</code> or <code>c</code>, but I'm not sure how or even if I can specify only to format <code>b</code> while keeping the rest of the <code>String</code> unformatted. </p>
  
  <p>In other words, I'm trying to do this:</p>
  
  <pre><code>String.format(foo, "test");
  </code></pre>
  
  <p>With the outcome:</p>
  
  <pre><code>a%sbtestc%s
  </code></pre>
  
  <p>Is it possible to manipulate a <code>String</code> like this or should I just use <code>String.replace</code> instead?</p>
  
  <p>A little more detail. The ultimate <code>String</code> will look something like: <code>aA-PARMbB-PARMcC-PARM</code> and then used to fetch some data. <code>a</code> and <code>c</code> are much more dynamic than <code>b</code>, so I'm trying to format <code>b</code> before hand.</p>
  
  <p>So, again. I'm trying to achieve the following:</p>
  
  <pre><code>String.format(foo, "B-PARM");
  </code></pre>
  
  <p>With the results:</p>
  
  <pre><code>a%sbB-PARMc%s
  </code></pre>
  
  <p>Then format the rest:</p>
  
  <pre><code>String.format(formattedFoo, "A-PARM", "C-PARM");
  </code></pre>