[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: metatables for strings?
- From: Nagaev Boris <bnagaev@...>
- Date: Sun, 3 May 2015 13:53:26 +0000
On Sun, May 3, 2015 at 1:41 PM, Sam Putman <atmanistan@gmail.com> wrote:
> Please?
>
> Pretty please?
>
> "with":"syntax sugar":on_top() --?
Lua uses one metatable for all strings.
> t = "abcd"
> t:upper()
"ABCD"
However, the following code is incorrect:
> "abcd":upper()
lua:1: unexpected symbol near '"abcd"'
I want this syntax for string.format.
--
Best regards,
Boris Nagaev