From: Jambunathan K <kjambunathan@gmail.com>
To: "Stephen J. Turnbull" <stephen@xemacs.org>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Bug in some calls to split-string.
Date: Sat, 20 Jul 2013 13:26:12 +0530 [thread overview]
Message-ID: <878v11ekbn.fsf@gmail.com> (raw)
In-Reply-To: <87hafpr8f0.fsf@uwakimon.sk.tsukuba.ac.jp> (Stephen J. Turnbull's message of "Sat, 20 Jul 2013 16:34:59 +0900")
"Stephen J. Turnbull" <stephen@xemacs.org> writes:
> Trimming leading and trailing whitespace is a generally useful
> function.
Org-mode's usage of `org-trim' gives this proposal 100+ upvotes.
(defun org-trim (s)
"Remove whitespace at beginning and end of string."
(if (string-match "\\`[ \t\n\r]+" s) (setq s (replace-match "" t t s)))
(if (string-match "[ \t\n\r]+\\'" s) (setq s (replace-match "" t t s)))
s)
next prev parent reply other threads:[~2013-07-20 7:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-19 19:09 Bug in some calls to split-string Richard Stallman
2013-07-20 7:34 ` Stephen J. Turnbull
2013-07-20 7:56 ` Jambunathan K [this message]
2013-07-20 8:36 ` Stephen J. Turnbull
2013-07-20 13:35 ` Richard Stallman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878v11ekbn.fsf@gmail.com \
--to=kjambunathan@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
--cc=stephen@xemacs.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.