lua-users home
lua-l archive

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


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