add split
parent
3331d86e98
commit
fb0f32b9ec
21
init.lua
21
init.lua
|
@ -239,17 +239,18 @@ end
|
||||||
-- return match(header, ";%s*boundary=([^\",;]+)")
|
-- return match(header, ";%s*boundary=([^\",;]+)")
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
-- function string.split(str, delimiter)
|
function string.split(str, delimiter)
|
||||||
-- if str==nil or str=='' or delimiter==nil then
|
if str==nil or str=='' or delimiter==nil then
|
||||||
-- return nil
|
return nil
|
||||||
-- end
|
end
|
||||||
|
|
||||||
|
local result = {}
|
||||||
|
for match in (str..delimiter):gmatch("(.-)"..delimiter) do
|
||||||
|
table.insert(result, match)
|
||||||
|
end
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
-- local result = {}
|
|
||||||
-- for match in (str..delimiter):gmatch("(.-)"..delimiter) do
|
|
||||||
-- table.insert(result, match)
|
|
||||||
-- end
|
|
||||||
-- return result
|
|
||||||
-- end
|
|
||||||
|
|
||||||
function innet(ip, network)
|
function innet(ip, network)
|
||||||
local star = ''
|
local star = ''
|
||||||
|
|
Loading…
Reference in New Issue