Clean up uses of Replace()

We were passing flags of DOH_REPLACE_ANY|DOH_REPLACE_FIRST in three
places, which doesn't make sense as those are mutually exclusive
concepts.  In the current implementation DOH_REPLACE_FIRST wins in
this situation, so replace with that and clarify the docs.
This commit is contained in:
Olly Betts 2022-02-06 09:54:21 +13:00
commit 9d7c962ee8
4 changed files with 8 additions and 3 deletions

View file

@ -1132,6 +1132,11 @@ DOH_REPLACE_FIRST - Replace first occurrence only.
Returns the number of replacements made (if any).
</p>
<p>
At most one of <tt>DOH_REPLACE_ANY</tt> and <tt>DOH_REPLACE_FIRST</tt> should be specified.
<tt>DOH_REPLACE_ANY</tt> is the default if neither is specified.
</p>
</div>
<H3><a name="Extending_nn16">40.5.2 Hashes</a></H3>