toolfunc文件拆分

This commit is contained in:
MrZ626
2021-02-13 04:05:28 +08:00
parent bdb8b91e1f
commit 9f285d21ef
15 changed files with 686 additions and 692 deletions

11
Zframework/splitStr.lua Normal file
View File

@@ -0,0 +1,11 @@
local find,sub=string.find,string.sub
function splitStr(s,sep)
local L={}
local p1,p2=1--start,target
while p1<=#s do
p2=find(s,sep,p1)or #s+1
L[#L+1]=sub(s,p1,p2-1)
p1=p2+#sep
end
return L
end