lua-users home
lua-l archive

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


On Monday, July 09, 2012 12:44:11 AM Patrick Donnelly wrote:
> Off-topic: wouldn't it be nice if we had a string.concat that just did
> (without some sanity checks and maybe luaL_tostring):
> 
> int string_concat (lua_State *L)
> {
>   lua_concat(L, lua_gettop(L));
>   return 1;
> }
> 
> Sure would make it easier to concat a dynamic number of strings
> without using an intermediate table.

The concat operator does this already. "A..B..C" generates only one CONCAT 
instruction, not two.

-- 
tom <telliamed@whoopdedo.org>