Documentation for this module may be created at Module:ModuleLevelTable/doc
local p = {}
function p.parseCSV(input)
local array = {}
local i = 1
-- Split the input by lines
for line in mw.text.split(input, "\n") do
array[i] = {}
local j = 1
-- Split each line by commas
for cell in mw.text.split(line, ",") do
array[i][j] = mw.text.trim(cell)
j = j + 1
end
i = i + 1
end
return array
end
function p.getTable(input)
local array = p.parseCSV(input.args[1] )
return array[1][1]
end
return p