[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Arithmetic on strings
- From: TNHarris <telliamed@...>
- Date: Mon, 9 Jul 2012 05:14:54 -0400
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>