Module:ModuleUniqueStatTable

From The First Descendant Wiki
Revision as of 06:14, 5 June 2024 by Software2 (talk | contribs)

Documentation for this module may be created at Module:ModuleUniqueStatTable/doc

local p = {}

local splitArray = {}

local function split(str)
    splitArray = {}
    for match in (str.."@"):gmatch("(.-)".."@") do
        table.insert(splitArray, match)
    end
end

function p.processData(frame)
    if frame.args.csv == nil then
        return "ERROR: Module:ModuleUniqueStatTable got no csv string! Please tell us on Discord!"
    end
    split(frame.args.csv)

    local result = ""
    for i, part in ipairs(splitArray) do
        result = result .. "####" .. part
    end
    return result
end

return p