[erlang-questions] Which is best? string:concat or ++?
Mon May 7 15:45:19 CEST 2012
I would recommend also looking at
On Mon, May 7, 2012 at 3:37 PM, Paul Davis <> wrote:
> Quick scan of the source shows that string:concat/2 is exactly the ++
> operator. So using ++ will save you a function invocation assuming the
> Erlang compiler doesn't optimize that away.
> On Mon, May 7, 2012 at 8:31 AM, Paul Barry <> wrote:
>> Hi folks.
>> This might be a case of a dumb question, but here goes anyway. :-)
>> I have two strings, A and B. Is it better to use:
>> string:concat(A, B)
>> A ++ B
>> when combining them to create a new string? I'm writing some code
>> that generates a chunk of HTML. I know that using ++ on big lists is
>> regarded as a "no-no", but is it acceptable here?
>> Paul Barry, w: http://paulbarry.itcarlow.ie - e:
>> Lecturer, Computer Networking: Institute of Technology, Carlow, Ireland.
>> erlang-questions mailing list
> erlang-questions mailing list
More information about the erlang-questions