[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaJIT string concat
- From: Francesco Abbate <francesco.bbt@...>
- Date: Wed, 13 Apr 2011 13:20:31 +0200
2011/4/13 Henning Diedrich <hd2010@eonblast.com>:
> This seems to be like the atomic operation for it
>
> '[' .. table.concat(t, ',') .. ']'
>
> does a subtler approach come to mind for anybody, e.g. drawing more
> explicitly from LuaJIT's strengths?
Not related to LuaJIT but I guess the following should be better:
string.format('[%s]', table.concat(t, ','))
because it does avoid the creation of unneeded temporary
strings(expect the one returned by table.concat.
Francesco