[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: removing spaces from a string

From: David Kastrup
Subject: Re: removing spaces from a string
Date: Wed, 19 Apr 2006 15:11:18 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Pascal Bourguignon <address@hidden> writes:

> David Kastrup <address@hidden> writes:
>> Peter Tury <address@hidden> writes:
>>> On Wed, 19 Apr 2006 12:01:21 +0200, LENNART BORGMAN wrote:
>>>> From: Peter Tury <address@hidden>
>>>>> I would need something like this: (remove-all-space a-sting-var); 
>>>> Maybe use replace-regexp-in-string?
>>> Thanks! I looked exactly for this one. Unfortunately I couldn't find it
>>> (using C-h a ..., and browsing the emacs and elisp manuals... -- now I see
>>> I should have used C-h d ...?)
>> It is also possible to do
>> (concat (delq ?\  (append "This is a string" nil)))
>> Or a number of other approaches.
> Merely:  (delete ?  "ab cd  ef") --> "abcdef"

Oops.  Didn't know about that delq/delete asymmetry.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

[Prev in Thread] Current Thread [Next in Thread]