Hi...
I've been trying to cut parts of sentences using string-left-trim.
The problem is that the function only accepts char, string, or sequence.
I've got this following code :
(setf sentence "1234 is a number")
(setf part (read-from-string sentence))
(setf sentence (string-left-trim part sentence))
> Error: value 1234 is not of the expected type SEQUENCE.
> While executing: LENGTH
> Type Command-. to abort.
Is there anyway to remove those numbers??
Thanks heaps!!
On Tue, 15 Aug 2000 17:37:11 +1000, Irma wrote:
> I've got this following code :
> (setf sentence "1234 is a number")
> (setf part (read-from-string sentence))
> (setf sentence (string-left-trim part sentence))
>> Error: value 1234 is not of the expected type SEQUENCE.
>> While executing: LENGTH
>> Type Command-. to abort.
> Is there anyway to remove those numbers??
Of course there is. Check out SUBSEQ, for example (the second return
value from READ-FROM-STRING might prove useful here).
But READ (from string or otherwise) is unlikely to be the right way to
deal with input such as your "sentence".
--
When C++ is your hammer, everything looks like a thumb.
-- Steven M. Haflich
(setq reply-to
(concatenate 'string "Paul Foley " "<mycroft" '(ยทยท@) "actrix.gen.nz>"))