Module:TildeToPipe

From Dune: Awakening Community Wiki
Jump to navigation Jump to search

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

-- Usage: {{#invoke:TildeToPipe|main|STRING}}


local p = {}

function p.main(frame)
    local input = frame.args[1]

    if not input or input == '' then
        return ''
    end

    -- replace all tildes with pipes
    input = input:gsub("~", "|")
    return input
end

return p