Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
alexandria
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Momchil Ivanov
alexandria
Commits
7fc0d5c0
Commit
7fc0d5c0
authored
Jan 26, 2013
by
Nikodemus Siivola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix starts-with-subseq :start1 and :start2
parent
e1da77b0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
sequences.lisp
sequences.lisp
+1
-1
tests.lisp
tests.lisp
+10
-0
No files found.
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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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