diff options
Diffstat (limited to 'src/algebra/string.spad.pamphlet')
-rw-r--r-- | src/algebra/string.spad.pamphlet | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/algebra/string.spad.pamphlet b/src/algebra/string.spad.pamphlet index d881d0a6..09adfaf7 100644 --- a/src/algebra/string.spad.pamphlet +++ b/src/algebra/string.spad.pamphlet @@ -599,17 +599,17 @@ the coercion. n := maxIndex pattern p := position(dontcare, pattern, m := minIndex pattern)::N p = m-1 => pattern = target - (p ^= m) and not prefix?(pattern(m..p-1), target) => false + (p ~= m) and not prefix?(pattern(m..p-1), target) => false i := p -- index into target q := position(dontcare, pattern, p + 1)::N - while q ^= m-1 repeat + while q ~= m-1 repeat s := pattern(p+1..q-1) i := position(s, target, i)::N i = m-1 => return false i := i + #s p := q q := position(dontcare, pattern, q + 1)::N - (p ^= n) and not suffix?(pattern(p+1..n), target) => false + (p ~= n) and not suffix?(pattern(p+1..n), target) => false true @ |