diff options
Diffstat (limited to 'script/utility.lua')
-rw-r--r-- | script/utility.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/script/utility.lua b/script/utility.lua index 5a52e417..47b0c8d8 100644 --- a/script/utility.lua +++ b/script/utility.lua @@ -83,7 +83,7 @@ local m = {} --- 打印表的结构 ---@param tbl table ----@param option table {optional = 'self'} +---@param option? table ---@return string function m.dump(tbl, option) if not option then @@ -315,8 +315,8 @@ function m.saveFile(path, content) end --- 计数器 ----@param init integer {optional = 'after'} ----@param step integer {optional = 'after'} +---@param init? integer +---@param step? integer ---@return fun():integer function m.counter(init, step) if not step then @@ -346,8 +346,8 @@ function m.sortPairs(t, sorter) end --- 深拷贝(不处理元表) ----@param source table ----@param target table {optional = 'self'} +---@param source table +---@param target? table function m.deepCopy(source, target) local mark = {} local function copy(a, b) @@ -566,7 +566,7 @@ end ---遍历文本的每一行 ---@param text string ----@param keepNL boolean # 保留换行符 +---@param keepNL? boolean # 保留换行符 ---@return fun(text:string):string, integer function m.eachLine(text, keepNL) local offset = 1 |