Re: Arithmetic on strings
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Arithmetic on strings
- From: Dirk Laurie <dirk.laurie@...>
- Date: Mon, 9 Jul 2012 09:30:49 +0200
2012年7月9日 Patrick Donnelly <batrick@batbytes.com>:
> 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,
>
> 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;
> }
>
It will take any of us max 10 minutes to write and compile
a module string_concat that returns only that one function.
Then
string.concat = require "string_concat"
does what you want.