[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: string-strip
From: |
Richard Stallman |
Subject: |
Re: string-strip |
Date: |
Mon, 19 Jun 2006 03:42:16 -0400 |
What about to introduce a simplified version of `comment-string-strip'
into subr.el - if it's not already somewhere?
(defun my-string-strip (str)
"Strip STR of any leading (if BEFOREP) and/or trailing (if AFTERP) space."
(string-match "\\`\\s-*\\(.*?\\)\\s-*\n?\\'" str)
(match-string 1 str))
(string-strip "asdf ")"asdf"
(string-strip " asdf")"asdf"
(string-strip " asdf ")"asdf"
It is a useful function and a simple one, and it won't delay the
release much. If you write the manual and NEWS changes for it first,
I will say yes.
- string-strip, Andreas Roehler, 2006/06/17
- Re: string-strip,
Richard Stallman <=
- Re: string-strip, Lars Hansen, 2006/06/19
- Re: string-strip, Richard Stallman, 2006/06/19
- Re: string-strip, Lars Hansen, 2006/06/20
- Re: string-strip, Richard Stallman, 2006/06/20
- Re: string-strip, Andreas Roehler, 2006/06/20
- Re: string-strip, Nick Roberts, 2006/06/20