From: Bill Wohler <wohler@newt.com>
Subject: Creating string from list of strings
Date: Mon, 14 Oct 2002 06:26:11 GMT [thread overview]
Message-ID: <80of9xtu2k.fsf@gbr.newt.com> (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.
next reply other threads:[~2002-10-14 6:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-14 6:26 Bill Wohler [this message]
2002-10-14 7:00 ` Creating string from list of strings 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=80of9xtu2k.fsf@gbr.newt.com \
--to=wohler@newt.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).