Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
alexandria
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Fedorov
alexandria
Commits
7fc0d5c0
Commit
7fc0d5c0
authored
12 years ago
by
Nikodemus Siivola
Browse files
Options
Downloads
Patches
Plain Diff
fix starts-with-subseq :start1 and :start2
parent
e1da77b0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sequences.lisp
+1
-1
1 addition, 1 deletion
sequences.lisp
tests.lisp
+10
-0
10 additions, 0 deletions
tests.lisp
with
11 additions
and
1 deletion
sequences.lisp
+
1
−
1
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
)
...
...
This diff is collapsed.
Click to expand it.
tests.lisp
+
10
−
0
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
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment