mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
parent
0758c93086
commit
755b517001
2 changed files with 3 additions and 4 deletions
|
@ -214,8 +214,7 @@ int zstring::indexofu(zstring const& other, unsigned offset) const {
|
|||
}
|
||||
|
||||
int zstring::last_indexof(zstring const& other) const {
|
||||
if (length() == 0 && other.length() == 0) return 0;
|
||||
if (other.length() == 0) return -1;
|
||||
if (other.length() == 0) return length();
|
||||
if (other.length() > length()) return -1;
|
||||
for (unsigned last = length() - other.length() + 1; last-- > 0; ) {
|
||||
bool suffix = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue