[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification
From: |
Jean-Christophe Helary |
Subject: |
Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification |
Date: |
Tue, 2 May 2017 18:34:17 +0900 |
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.
Please advise.
Jean-Christophe
subr-x.el.diff
Description: Binary data
- Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification,
Jean-Christophe Helary <=
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Clément Pit-Claudel, 2017/05/02
- 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