lua-users home
lua-l archive

Re: list table methods

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


2013年8月16日 Sergey Zavadski <sergeyzavadski@gmail.com>:
> I want to list in the runtime methods that particular table contains. Is it possible to do in lua?
function listfuncs(tbl)
 for k,v in pairs(tbl) do if type(v)=="function" then print(k) end end
end

AltStyle によって変換されたページ (->オリジナル) /