From: Irma
Subject: string-trim for numbers
Date: 
Message-ID: <3998F326.7746E869@cellular-roaming.com>
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!!
From: Paul Foley
Subject: Re: string-trim for numbers
Date: 
Message-ID: <m266p3ymcu.fsf@mycroft.actrix.gen.nz>
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>"))