lua-users home
lua-l archive

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


On 05/03/2015 03:53 PM, Nagaev Boris wrote:
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.

Here you go:
http://lua-users.org/wiki/ThomasJericke
http://lua-users.org/files/wiki_insecure/power_patches/5.2/optbrackets-5.2.2.patch

Only for 5.2 so far.

--
Thomas