lua-users home
lua-l archive

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

> Well, this is at the Lua level, not the C API, but I have often missed
> the absence of Lua access to lua_concat. The big point being that
> lua_concat respects metamethods but table.concat does not.

What would say string.concat achieve that cannot be written explicitly?
Every call to string.concat would have a fixed number of arguments and
so can be replaced by a series of explicit concatenations a1 .. a2 ..
etc. The only exception might be if you call string.concat inside a
vararg function, but even in this case it can be reworked I guess.

Perhaps I'm missing a killer application of string.concat. If you have
one, please share.