lua实现split字符串分隔 [原创]已关闭评论
3℃
之前写了个类似php的var_dump()函数,下面在来一个print_r()函数,代码如下:
function pr (t, name, indent)
local tableList = {}
function table_r (t, name, indent, full)
local id = not full and name or type(name)~="number" and tostring(name) or '['..name..']'
local tag = indent .. id .. ' = '
local out = {} -- result
if type(t) == "table" then
if tableList[t] ~= nil then
table.insert...
lua, php, print_r阅读全文