摘要: 平时用的比较少,一直记不起来的,对应c#中的 do while local i = 1 local len = 10 repeat --do something i = i + 1 until i <= len for是最常用的 local len = 10 for i=1,len do --do 阅读全文
posted @ 2023-05-17 23:19 yanghui01 阅读(15) 评论(0) 推荐(0)
摘要: table_ext.lua 如果table不为空则新建 function table.getEmptyTable(tb) if nil == tb or nil ~= next(tb) then return {} end return tb end function table.isEmpty(t 阅读全文
posted @ 2023-05-17 23:11 yanghui01 阅读(117) 评论(0) 推荐(0)
摘要: table_listext.lua function list.reset(listTb, val) for i=1,#listTb do listTb[i] = val end end function list.castItemToNum(listTb) for i=1,#listTb do l 阅读全文
posted @ 2023-05-17 23:08 yanghui01 阅读(50) 评论(0) 推荐(0)