[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Arithmetic on strings
- From: Patrick Donnelly <batrick@...>
- Date: Mon, 9 Jul 2012 00:44:11 -0400
On Mon, Jul 9, 2012 at 12:38 AM, Miles Bader <miles@gnu.org> wrote:
> E.g., I agree that the format %s directive should call tostring on its
> argument. But I think (1) string.concat should not,
Well, there is no string.concat :). [I know you meant table.concat.]
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.
--
- Patrick Donnelly