GNU bug report logs - #13617
24.2.92; [PATCH] Add strip-string

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Sun, 3 Feb 2013 07:38:02 UTC

Severity: wishlist

Tags: fixed, patch

Found in version 24.2.92

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Leo Liu <sdl.web <at> gmail.com>
To: 13617 <at> debbugs.gnu.org
Subject: bug#13617: 24.2.92; [PATCH] Add strip-string
Date: Sun, 03 Feb 2013 17:40:01 +0800
On 2013-02-03 16:56 +0800, Andreas Schwab wrote:
> You could use the same rules as skip-chars-forward.

I looked at skip-chars-forward before opening this bug but found it
complicate things by introducing new rules.

In strip-string the idea is to have a default covering 90% of the use
cases:

(strip-string s)        ; strip both
(strip-string s nil "") ; strip leading
(strip-string s "")     ; strip trailing

Refer users to regexp as in (info "(elisp)Regexp Special") for the
remaining 10% use cases.

Regards,
Leo





This bug report was last modified 9 years and 176 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.