title: Java Stringbuilder.replace
body: <p>Consider the following inputs:</p>
  
  <pre><code>String[] input = {"a9", "aa9", "a9a9", "99a99a"};
  </code></pre>
  
  <p>What would be the most efficient way whilst using a StringBuilder to replace any digit directly prior to a nine with the next letter after it in the alphabet?</p>
  
  <p>After processing these inputs the output should be:</p>
  
  <pre><code>String[] output = {"b9", "ab9", "b9b9", "99b99a"}
  </code></pre>
  
  <p>I've been scratching my head for a while and the StringBuilder.setCharAt was the best method I could think of.</p>
  
  <p>Any advice or suggestions would be appreciated.</p>