title: StringReplace fails to replace all instances of a string
body: <p>The Dephi 7 help manual says of StringReplace...</p>
  <blockquote>
  <p>Returns a string with occurrences of one substring replaced by another substring...</p>
  <p>If Flags does not include rfReplaceAll, StringReplace only replaces the first occurrence of OldPattern in S. Otherwise, StringReplace replaces all instances of OldPattern with NewPattern.</p>
  </blockquote>
  <p>The statement that, &quot;Otherwise, StringReplace replaces all instances of OldPattern with NewPattern&quot; appears to be a BOGUS statement, for in the example below, instances of &quot;aa&quot; remain even after I instruct the function to &quot;replace all instances of 'aa' (OldPattern) with 'a' (NewPattern)&quot;!</p>
  <pre><code>StringReplace('aaa aaa','aa','a',[rfReplaceAll]);
  </code></pre>
  <p>If the Delphi manual was accurate, then I should be getting 'a a' as the final result. Unfortunately, I am getting 'aa aa'.  Clearly not all instances of &quot;OldPattern&quot; ('aa') were replaced.</p>
  <p>Is this a bug, or simply a misleading/inaccurate description for the function?</p>