emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] * lisp/subr.el (string-suffix-p): New function.


From: Stefan Monnier
Subject: Re: [PATCH] * lisp/subr.el (string-suffix-p): New function.
Date: Fri, 22 Nov 2013 09:07:04 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> You can't really favour this:
>   (mapconcat #'identity (list s1 s2 s3) separator)
> over:
>   (string-join separator s1 s2 s3)

I'm not sure if one is clearly superior to the other.  But having one,
there's not much motivation to add the other.  But `string-join' can
definitely be added to the new helpers.el.

>> > * string-trim/string-trim-left/string-trim-right
>> Perhaps.

These also would be good candidates for helpers.el.

>> > * string-chop

I can't remember using something similar to string-chop.  In Perl, this
was handy because it's frequent to receive "a line with a terminating
LF", but in Emacs it doesn't seem to happen nearly as often.


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]