lua-users home
lua-l archive

Re: Arithmetic on strings

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


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

AltStyle によって変換されたページ (->オリジナル) /