ex: (strip-char-from-string 97 "FooBar") => "FooBr"
Maybe I'm stupid but I can't find a simple way to do it...
(or maybe the function already exists but I cant find it?)
Any help?
A not working attempt:
(map 'string
(lambda (x)
(if (not (eq x char)) x 0))
string)
Thanks!
-jp
jpt> I want to define a function (strip-char-from-string CHAR STRING)
jpt>
jpt> ex: (strip-char-from-string 97 "FooBar") => "FooBr"
(require 'cl)
(remove ?a "FooBar")
--
Eric Marsden
Ah ah! You just used (require 'cl) :)
Cheers
--
Marco Antoniotti ===========================================
PARADES, Via San Pantaleo 66, I-00186 Rome, ITALY
tel. +39 - 06 68 10 03 17, fax. +39 - 06 68 80 79 26
http://www.parades.rm.cnr.it/~marcoxa
> Eric Marsden <emar...@mail.dotcom.fr> writes:
>
> > >>>>> "jpt" == J-P Theberge <jp...@act.oda.fr> writes:
> >
> > jpt> I want to define a function (strip-char-from-string CHAR STRING)
> > jpt>
> > jpt> ex: (strip-char-from-string 97 "FooBar") => "FooBr"
> >
> > (require 'cl)
> > (remove ?a "FooBar")
>
> Ah ah! You just used (require 'cl) :)
>
I would be great if the emacs lisp manual include functions from other
standart package like cl.
(I know complaining here is not the right way for this to happen
but my english & emacslisp skills are not good enought to do it myself)
-jp
The cl package comes with its own Info documentation, which is included
in the Emacs distribution (unlike the Emacs Lisp manual). See the Info
node (cl)Top.
--
Gareth Rees
It already does: you should have the file "cl" in your info subdirectory.
Type "C-h i", then "g (cl) RET", and you will be reading it. I can find the
description of the `remove' function if I press "i remove RET".