[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: concat with separators ?
From: |
Jean-Christophe Helary |
Subject: |
Re: concat with separators ? |
Date: |
Sun, 28 May 2017 14:33:44 +0900 |
> On May 24, 2017, at 23:34, Clément Pit-Claudel <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))
Would it be acceptable to provide separators to concat or is it preferable to
use string-join instead?
Jean-Christophe