mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
fix axiomatization of str.replace. Fixes issue #703
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
2d8325ed43
commit
879f792125
2 changed files with 7 additions and 2 deletions
|
@ -144,6 +144,9 @@ zstring zstring::replace(zstring const& src, zstring const& dst) const {
|
|||
if (length() < src.length()) {
|
||||
return zstring(*this);
|
||||
}
|
||||
if (src.length() == 0) {
|
||||
return zstring(*this);
|
||||
}
|
||||
bool found = false;
|
||||
for (unsigned i = 0; i < length(); ++i) {
|
||||
bool eq = !found && i + src.length() <= length();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue