Index: 残局文料/lib_lua/ipml_mj_ysaf.lua ================================================================== --- 残局文料/lib_lua/ipml_mj_ysaf.lua +++ 残局文料/lib_lua/ipml_mj_ysaf.lua @@ -49,16 +49,30 @@ d_5.写件(o1, k1, o2) end function d_5.删制表符(o1) return o1:gsub("\t", "") end -function d_5.删空行(o1) - return o1:gsub("\n\n+", "") +function d_5.删前缀(o1, o2) + if o1:find(o2, 1, true) then + return o1:sub(#o2 + 1) + end + end +function d_5.删后缀(o1, o2) + if o1:find(o2, -1, true) then + return o1:sub(1, #o1 - #o2) + end + end +function d_5.删空行_快态(o1) + return o1:gsub("\n+", "\n") + end +function d_5.删空行_慢态(o1) + o1 = o1:gsub("\n+", "\n") + o1 = d_5.删前缀(o1, "\n") + return d_5.删后缀(o1, "\n") end -function d_5.删制表符与空行(o1) - o1 = d_5.删制表符(o1) - return d_5.删空行(o1) +function d_5.删空格(o1) + return o1:gsub(" ", "") end function d_5.筛排(o1_9, o1, o2, o3) local k1_8 local k1_9 k1_9 = {} Index: 残局文料/产常量件.lua ================================================================== --- 残局文料/产常量件.lua +++ 残局文料/产常量件.lua @@ -6,12 +6,15 @@ local d_2 = {} function d_2.产常量件(o1) local k1 k1 = 常用库.读件(o1 .. "/script/constant.lua", "rb") k1 = 删注库_月程语态_不虑字串态.事启(k1) - k1 = 常用库.删制表符与空行(k1) - print(k1) + k1 = 常用库.删制表符(k1) + k1 = 常用库.删空行(k1) + k1 = 常用库.删空格(k1) + --~ print(1) + print(k1:gsub("\n", "猪")) end function d_2.筛凡常量() end function d_2.筛字段量()