lua-users home
lua-l archive

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


> You can't do that in pure Lua, because in some cases no metamethod is
> involved (see below).

sure there is. try this:

getmetatable("").__tostring=function (x) return "<<<"..x..">>>" end

for k,v in next,string do print(k,v) end
print("hello")