formatting
This commit is contained in:
parent
7a0759a268
commit
671f1efc40
1 changed files with 5 additions and 5 deletions
|
@ -8,12 +8,12 @@ local wml_actions = wesnoth.wml_actions
|
|||
-- second part of this file
|
||||
|
||||
local function split_to_array(str, sep)
|
||||
-- Split string @str into a table using the delimiter @sep (default: ',')
|
||||
-- Split string @str into a table using the delimiter @sep (default: ',')
|
||||
|
||||
local sep, fields = sep or ",", {}
|
||||
local pattern = string.format("([^%s]+)", sep)
|
||||
string.gsub(str, pattern, function(c) fields[#fields+1] = c end)
|
||||
return fields
|
||||
local sep, fields = sep or ",", {}
|
||||
local pattern = string.format("([^%s]+)", sep)
|
||||
string.gsub(str, pattern, function(c) fields[#fields+1] = c end)
|
||||
return fields
|
||||
end
|
||||
|
||||
local function make_set(t)
|
||||
|
|
Loading…
Add table
Reference in a new issue