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:
parent
3354423c15
commit
9d7c962ee8
4 changed files with 8 additions and 3 deletions
|
|
@ -249,7 +249,7 @@ String *partial_arg(String *s, String *p) {
|
|||
}
|
||||
prefix = NewStringWithSize(cp, (int)(c - cp));
|
||||
newarg = Copy(s);
|
||||
Replace(newarg, prefix, "", DOH_REPLACE_ANY | DOH_REPLACE_FIRST);
|
||||
Replace(newarg, prefix, "", DOH_REPLACE_FIRST);
|
||||
Delete(prefix);
|
||||
return newarg;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue