游戏王残局简化版

算机_程语_月_注_删_不虑字串.lua at [543bb217ba]
Login

算机_程语_月_注_删_不虑字串.lua at [543bb217ba]

File 残局文料/lua_lib/算机_程语_月_注_删_不虑字串.lua artifact 259b017646 part of check-in 543bb217ba


local 字集库 = require("u8_to_a")
local 文库 = require(字集库.u8_to_a("算机_程语_月_基类_文"))
local string = string
local s = {}
-- 单行注与多行注
--~ 文
function s.删注(u1)
  u1 = s.删多行注(u1)
  return s.删单行注(u1)
  end
do
  local h1
  --~ 模
  h1 = 文库.连("%-%-", "%[", "(=*)", "%[", ".-", "%]", "%1", "%]")
  --~ 文
  function s.删多行注(u1)
    return string.gsub(u1, h1, "")
    end
  end
do
  local h1
  --~ 模
  h1 = 文库.连("%-%-", "[^\n]*")
  --~ 文
  function s.删单行注(u1)
    return string.gsub(u1, h1, "")
    end
  end
return s