emacs-devel
[Top][All Lists]
Advanced

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

Re: concat with separators ?


From: Clément Pit-Claudel
Subject: Re: concat with separators ?
Date: Wed, 24 May 2017 10:34:48 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1

On 2017-05-24 10:21, Kaushal Modi wrote:
> On Wed, May 24, 2017 at 10:19 AM Jean-Christophe Helary <address@hidden 
> <mailto:address@hidden>> wrote:
> 
>     I just realized today that concat did not come with optional separators 
> (unlike mapconcat). Is there a reason for that ?
> 
> 
> I just using mapconcat when I feel that need:
> 
> Example:
> 
> (mapconcat #'identity '("a" "b" "c") "|")  => "a|b|c"

That's roughly the definition of string-join in subr-x:

(defsubst string-join (strings &optional separator)
  "Join all STRINGS using SEPARATOR."
  (mapconcat 'identity strings separator))





reply via email to

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