Editing Module:AeroWikiListTools
From Aeronautica Official Wiki
More actions
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
p.split_list = function (input_string, template) | |||
p.split_list | |||
local new_string = '' | local new_string = '' | ||
error(input_string) | |||
for split in string.gmatch(input_string, '([^, ]+)') do | |||
new_string = new_string .. template:gsub('{split}', split) .. ', ' | |||
for split in string.gmatch(input_string , '([^,]+)') do | |||
new_string = new_string .. template:gsub('{split}', split | |||
end | end | ||
return new_string:sub(1, -3) | |||
return new_string | |||
end | end | ||
return p | return p |