[erlang-questions] string concatenation efficiency
Richard Carlsson
carlsson.richard@REDACTED
Thu Jan 28 12:24:57 CET 2016
Note that ++ is just an operator alias for lists:append/2.
/Richard
2016-01-28 8:22 GMT+01:00 Khitai Pang <khitai.pang@REDACTED>:
> Hi,
>
> For string concatenation, which one of the following is the most efficient?
>
> 1)
> strings:join(["Item:{", ItemID, "}")], ""]
>
> 2)
> lists:append(["Item:{", ItemID, "}")])
>
> 3)
> "Item:{" ++ ItemID ++ "}"
>
> Here ItemID is a UUID.
>
>
> Thanks
> Khitai
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160128/d7ba0b71/attachment.htm>
More information about the erlang-questions
mailing list