title: Replace the last occurrence of a string in another string
body: <p>Let's say I have a string</p>
  
  <pre><code>string myWord="AAAAA";
  </code></pre>
  
  <p>I want to replace "AA" with "BB", but only the last occurrence, like so:</p>
  
  <pre><code>"AAABB"
  </code></pre>
  
  <p>Neither <em>string.replace()</em> nor <em>string.replaceFirst()</em> would do the job.
  Is there a <em>string.replaceLast()</em>? And, If not, will there ever be one or is there an alternative also working with regexes?</p>