Module:Sond-roots
From Allocosm
Documentation for this module may be created at Module:Sond-roots/doc
export = {}
require("Module:sond-roots/data")
function export.replace(str1, str2, oper)
local rules = {}
local output = ""
local orig_oper = opers[oper]
local orig_rules = orig_oper[1]
local default = orig_oper[2]
for k,v in pairs(orig_rules) do
rules[k] = string.gsub(v,"[12]",{["1"] = str1, ["2"] = str2})
end
default = string.gsub(default,"[12]",{["1"] = str1, ["2"] = str2})
output = rules[str1..str2] or default
return output
end
return export