mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-30 19:13:53 +01:00
revert to fsplit
This commit is contained in:
parent
ce1ba27728
commit
72513b350a
@ -48,13 +48,13 @@ end
|
|||||||
-- @param plain boolean If true (or truthy), pattern is interpreted as a
|
-- @param plain boolean If true (or truthy), pattern is interpreted as a
|
||||||
-- plain string, not a Lua pattern
|
-- plain string, not a Lua pattern
|
||||||
-- @returns table A sequence table containing the substrings
|
-- @returns table A sequence table containing the substrings
|
||||||
-- function worldeditadditions.split(text, pattern, plain)
|
function worldeditadditions.split(text, pattern, plain)
|
||||||
-- local ret = {}
|
local ret = {}
|
||||||
-- for match in worldeditadditions.gsplit(text, pattern, plain) do
|
for match in worldeditadditions.gsplit(text, pattern, plain) do
|
||||||
-- table.insert(ret, match)
|
table.insert(ret, match)
|
||||||
-- end
|
end
|
||||||
-- return ret
|
return ret
|
||||||
-- end
|
end
|
||||||
|
|
||||||
--- Split a string into substrings separated by a pattern.
|
--- Split a string into substrings separated by a pattern.
|
||||||
-- @param str string The string to iterate over
|
-- @param str string The string to iterate over
|
||||||
@ -62,7 +62,7 @@ end
|
|||||||
-- @param plain boolean If true (or truthy), pattern is interpreted as a
|
-- @param plain boolean If true (or truthy), pattern is interpreted as a
|
||||||
-- plain string, not a Lua pattern
|
-- plain string, not a Lua pattern
|
||||||
-- @returns table A sequence table containing the substrings
|
-- @returns table A sequence table containing the substrings
|
||||||
function worldeditadditions.split (str,dlm,plain)
|
function worldeditadditions.fsplit (str,dlm,plain)
|
||||||
local pos, ins = 0, 0
|
local pos, ins = 0, 0
|
||||||
local ret = {}
|
local ret = {}
|
||||||
repeat
|
repeat
|
||||||
|
Loading…
Reference in New Issue
Block a user