Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the split-sequence Reference Manual, version 2.0.0, generated automatically by Declt version 3.0 "Montgomery Scott" on Tue Dec 22 15:06:50 2020 GMT+0.
• Introduction | What split-sequence is all about | |
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
SPLIT-SEQUENCE is a member of the Common Lisp Utilities family of programs, designed by community consensus.
Function SPLIT-SEQUENCE, SPLIT-SEQUENCE-IF, SPLIT-SEQUENCE-IF-NOT
Syntax:
split-sequence delimiter sequence &key
count
remove-empty-subseqs from-end start end test test-not key ⇒ list,
index
split-sequence-if predicate sequence &key
count
remove-empty-subseqs from-end start end key ⇒ list, index
split-sequence-if-not predicate sequence &key
count
remove-empty-subseqs from-end start end key ⇒ list, index
Arguments and Values:
delimiter—an object.
predicate—a designator for a function of one argument that returns a generalized boolean.
sequence—a proper sequence.
count—an integer or nil. The default is nil.
remove-empty-subseqs—a generalized boolean. The default is false.
from-end—a generalized boolean. The default is false.
start, end—bounding index designators of sequence. The defaults for start and end are 0 and nil, respectively.
test—a designator for a function of two arguments that returns a generalized boolean.
test-not—a designator for a function of two arguments that returns a generalized boolean.
key—a designator for a function of one argument, or nil.
list—a proper sequence.
index—an integer greater than or equal to zero, and less than or equal to the length of the sequence.
Description:
Splits sequence into a list of subsequences delimited by objects satisfying the test.
List is a list of sequences of the same kind as sequence that has elements consisting of subsequences of sequence that were delimited in the argument by elements satisfying the test. Index is an index into sequence indicating the unprocessed region, suitable as an argument to subseq to continue processing in the same manner if desired.
The count argument, if supplied, limits the number of subsequences in the first return value; if more than count delimited subsequences exist in sequence, the count leftmost delimited subsequences will be in order in the first return value, and the second return value will be the index into sequence at which processing stopped.
If from-end is non-null, sequence is conceptually processed from right to left, accumulating the subsequences in reverse order; from-end only makes a difference in the case of a non-null count argument. In the presence of from-end, the count rightmost delimited subsequences will be in the order that they are in sequence in the first return value, and the second is the index indicating the end of the unprocessed region.
The start and end keyword arguments permit a certain subsequence of the sequence to be processed without the need for a copying stage; their use is conceptually equivalent to partitioning the subsequence delimited by start and end, only without the need for copying.
If remove-empty-subseqs is null (the default), then empty subsequences will be included in the result.
In all cases, the subsequences in the first return value will be in the order that they appeared in sequence.
Examples:
Next: Files, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The split-sequence system |
Sharp Lispers <sharplispers@googlegroups.com>
Arthur Lemmens <alemmens@xs4all.nl>
MIT
Splits a sequence into a list of subsequences delimited by objects satisfying a test.
2.0.0
split-sequence.asd (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files | ||
• Static files |
Next: Static files, Previous: Files, Up: Files [Contents][Index]
Next: The split-sequence/package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
split-sequence.asd
split-sequence (system)
Next: The split-sequence/vector․lisp file, Previous: The split-sequence․asd file, Up: Lisp files [Contents][Index]
split-sequence (system)
package.lisp
Next: The split-sequence/list․lisp file, Previous: The split-sequence/package․lisp file, Up: Lisp files [Contents][Index]
split-sequence (system)
vector.lisp
Next: The split-sequence/extended-sequence․lisp file, Previous: The split-sequence/vector․lisp file, Up: Lisp files [Contents][Index]
split-sequence (system)
list.lisp
Next: The split-sequence/api․lisp file, Previous: The split-sequence/list․lisp file, Up: Lisp files [Contents][Index]
(or sbcl abcl)
split-sequence (system)
extended-sequence.lisp
Next: The split-sequence/documentation․lisp file, Previous: The split-sequence/extended-sequence․lisp file, Up: Lisp files [Contents][Index]
split-sequence (system)
api.lisp
Previous: The split-sequence/api․lisp file, Up: Lisp files [Contents][Index]
split-sequence (system)
documentation.lisp
Previous: Lisp files, Up: Files [Contents][Index]
• The split-sequence/version.sexp file |
Previous: Static files, Up: Static files [Contents][Index]
split-sequence (system)
version.sexp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The split-sequence package |
package.lisp (file)
common-lisp
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported functions |
Previous: Exported definitions, Up: Exported definitions [Contents][Index]
Return a list of subsequences in seq delimited by delimiter.
If :remove-empty-subseqs is NIL, empty subsequences will be included
in the result; otherwise they will be discarded. All other keywords
work analogously to those for CL:SUBSTITUTE. In particular, the
behaviour of :from-end is possibly different from other versions of
this function; :from-end values of NIL and T are equivalent unless
:count is supplied. :count limits the number of subseqs in the main
resulting list. The second return value is an index suitable as an
argument to CL:SUBSEQ into the sequence indicating where processing
stopped.
api.lisp (file)
Return a list of subsequences in seq delimited by items satisfying
predicate.
If :remove-empty-subseqs is NIL, empty subsequences will be included
in the result; otherwise they will be discarded. All other keywords
work analogously to those for CL:SUBSTITUTE-IF. In particular, the
behaviour of :from-end is possibly different from other versions of
this function; :from-end values of NIL and T are equivalent unless
:count is supplied. :count limits the number of subseqs in the main
resulting list. The second return value is an index suitable as an
argument to CL:SUBSEQ into the sequence indicating where processing
stopped.
api.lisp (file)
Return a list of subsequences in seq delimited by items satisfying
(CL:COMPLEMENT predicate).
If :remove-empty-subseqs is NIL, empty subsequences will be included
in the result; otherwise they will be discarded. All other keywords
work analogously to those for CL:SUBSTITUTE-IF-NOT. In particular,
the behaviour of :from-end is possibly different from other versions
of this function; :from-end values of NIL and T are equivalent unless
:count is supplied. :count limits the number of subseqs in the main
resulting list. The second return value is an index suitable as an
argument to CL:SUBSEQ into the sequence indicating where processing
stopped.
api.lisp (file)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal macros | ||
• Internal functions | ||
• Internal conditions | ||
• Internal types |
Next: Internal functions, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
api.lisp (file)
Next: Internal conditions, Previous: Internal macros, Up: Internal definitions [Contents][Index]
api.lisp (file)
Collect elements from LIST until one that satisfies PREDICATE is found.
At most END elements will be examined. If END is null, all elements will be examined.
Returns four values:
* The collected items.
* The remaining items.
* The number of elements examined.
* Whether the search ended by running off the end, instead of by finding a delimiter.
list.lisp (file)
Count the number of elements satisfying PREDICATE at the beginning of LIST.
At most END elements will be counted. If END is null, all elements will be examined.
list.lisp (file)
api.lisp (file)
extended-sequence.lisp (file)
extended-sequence.lisp (file)
extended-sequence.lisp (file)
extended-sequence.lisp (file)
extended-sequence.lisp (file)
list.lisp (file)
list.lisp (file)
list.lisp (file)
list.lisp (file)
list.lisp (file)
list.lisp (file)
vector.lisp (file)
vector.lisp (file)
vector.lisp (file)
vector.lisp (file)
vector.lisp (file)
Next: Internal types, Previous: Internal functions, Up: Internal definitions [Contents][Index]
api.lisp (file)
Previous: Internal conditions, Up: Internal definitions [Contents][Index]
vector.lisp (file)
extended-sequence.lisp (file)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | F L S |
---|
Jump to: | F L S |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | C F L M S |
---|
Jump to: | C F L M S |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | A C E P S T |
---|
Jump to: | A C E P S T |
---|