[Top][All Lists]

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

Re: Creating string from list of strings

From: Stefan Monnier <address@hidden>
Subject: Re: Creating string from list of strings
Date: 14 Oct 2002 03:00:23 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>>>>> "Bill" == Bill Wohler <> writes:
>     (message (perform-magic-with list-of-strings))

Beware! `message' is like `printf' in C: it expects a format argument.
So you'd better use (message "%s" (perform-magic-with list-of-strings))

>   While the following works, it seems that there should be a one-liner
>   to do this already:

>     (defvar my-string)
>     (while list-of-strings
>       (setq my-string (concat my-string (car list-of-strings)))
>       (setq list-of-strings (cdr list-of-strings)))
>     (message (my-string))

Try `mapconcat'.


reply via email to

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