unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Creating string from list of strings
@ 2002-10-14  6:26 Bill Wohler
  2002-10-14  7:00 ` Stefan Monnier <foo@acm.com>
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Bill Wohler @ 2002-10-14  6:26 UTC (permalink / raw)


  I wasn't able to figure out from the Elisp manual how to turn a list
  of strings into a single string. For example, how does one
  print the following list of strings?

    (setq list-of-strings '("foo" "bar"))
    (message (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))

-- 
Bill Wohler <wohler@newt.com>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and mh-e. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-10-14 21:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-14  6:26 Creating string from list of strings Bill Wohler
2002-10-14  7:00 ` Stefan Monnier <foo@acm.com>
2002-10-14  7:05 ` John Paul Wallington
2002-10-14 14:00 ` Joe Casadonte
2002-10-14 15:15   ` Tom Capey
2002-10-14 15:35   ` Stefan Monnier <foo@acm.com>
2002-10-14 17:09     ` Joe Casadonte
2002-10-14 21:00     ` Bill Wohler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).