Module:T7/ComboRow

From SuperCombo Wiki

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

local p = {}

function trim(s)
    return s:match('^%s*(.-)%s*$')
end

function p.comboRow(frame)
    local input = frame.args[1] or ''
    local delimiter = frame.args.delimiter or ','

    local out = {}
    for token in string.gmatch(input, '([^'..delimiter..']+)') do
        token = trim(token)
        table.insert(out, string.format("{{Icon-TKC|%s}}", token))
    end

    return table.concat(out)
end

return p