Re: split-sequence
- From: Pascal Bourguignon <spam@xxxxxxxxxxxxxxxx>
- Date: Fri, 30 Dec 2005 08:43:14 +0100
Tin Gherdanarra <tinman31337@xxxxxxxxx> writes:
> On cliki and in the cl-cookbook I read that
> split-sequence:split-sequence is used to
> uhm, to split a sequence. The examples show
> how it is used to split along a single element,
> like this:
>
> (split-sequence:split-sequence #\Space "just whisper 'wermuth'")
> gives
> ("just" "whisper" "wermuth")
> 22
Either you've got a strange split-sequence, or you don't know how to
copy-and-paste:
[159]> (split-sequence:split-sequence #\Space "just whisper 'wermuth'")
("just" "whisper" "'wermuth'") ;
22
>
> Is there a way to put split-sequence to work that
> it can split a sequence along another sequence,
> like this:
>
> (split:sequence:split-sequence "spam" "We have spam we have spam and spam")
> shall give
> ("We have" "we have" "and")
No, this will give an error:
[160]> (split:sequence:split-sequence "spam" "We have spam we have spam and spam")
*** - READ from
#<INPUT CONCATENATED-STREAM #<INPUT STRING-INPUT-STREAM>
#<IO TERMINAL-STREAM>>
: too many colons in token "split:sequence:split-sequence"
The following restarts are available:
ABORT :R1 ABORT
Break 1 [161]> :q
> I tried all sorts of args and options, to no avail.
> My guess is that split-sequence is not made for this.
Indeed, split sequence is not made for this.
A string is a sequence of CHARACTERS, not a sequence of substrings.
> [...]
--
__Pascal Bourguignon__ http://www.informatimago.com/
READ THIS BEFORE OPENING PACKAGE: According to certain suggested
versions of the Grand Unified Theory, the primary particles
constituting this product may decay to nothingness within the next
four hundred million years.
.
- References:
- split-sequence
- From: Tin Gherdanarra
- split-sequence
- Prev by Date: Re: type systems as libraries
- Next by Date: Re: LELISP (-->LISP) --> C/C++ or other common language
- Previous by thread: Re: split-sequence
- Next by thread: L Sharp 1.2 Released
- Index(es):
Relevant Pages
|
|