Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Knut Olav Bøhmer
alexandria
Commits
7fc0d5c0
Commit
7fc0d5c0
authored
Jan 26, 2013
by
Nikodemus Siivola
Browse files
fix starts-with-subseq :start1 and :start2
parent
e1da77b0
Changes
2
Hide whitespace changes
Inline
Side-by-side
sequences.lisp
View file @
7fc0d5c0
...
...
@@ -289,7 +289,7 @@ displaced array pointing to the sequence after PREFIX."
(
let
((
sequence-length
(
length
sequence
))
(
prefix-length
(
length
prefix
)))
(
if
(
<=
prefix-length
sequence-length
)
(
let
((
mismatch
(
apply
#'
mismatch
sequence
prefix
args
)))
(
let
((
mismatch
(
apply
#'
mismatch
prefix
sequence
args
)))
(
if
mismatch
(
if
(
<
mismatch
prefix-length
)
(
values
nil
nil
)
...
...
tests.lisp
View file @
7fc0d5c0
...
...
@@ -1852,3 +1852,13 @@
(
incf
n
))
n
)
13
)
(
deftest
starts-with-subseq.start1
(
starts-with-subseq
"foo"
"oop"
:start1
1
)
t
nil
)
(
deftest
starts-with-subseq.start2
(
starts-with-subseq
"foo"
"xfoop"
:start2
1
)
t
nil
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment