[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification
From: |
Clément Pit-Claudel |
Subject: |
Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification |
Date: |
Tue, 2 May 2017 11:41:42 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
Looks good. The stirng could be called string-trim-regexp (no need for
default), though, I think.
On 2017-05-02 05:34, Jean-Christophe Helary wrote:
> Following the discussion about how trimming in subr-x.el did not allow for
> non-default regex, I have this small modification to the 3 trimming functions
> found therein.
>
> Basically:
> 1) I extracted the default regex and assigned it to string-trim-default-regex
> 2) I declared optional "trim-left" and "trim-right" arguments respectively
> for the string-trim-left and string-trim-right functions, and declared both
> optional for the general string-trim function
>
> The documentation strings are pretty much taken from subr.el so maybe the
> wording is not the best.
- Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Jean-Christophe Helary, 2017/05/02
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification,
Clément Pit-Claudel <=
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Eli Zaretskii, 2017/05/02
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Mark Oteiza, 2017/05/02
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Jean-Christophe Helary, 2017/05/02
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Jean-Christophe Helary, 2017/05/05
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Tino Calancha, 2017/05/06
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Jean-Christophe Helary, 2017/05/06
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Eli Zaretskii, 2017/05/06
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Jean-Christophe Helary, 2017/05/06