Jump to content

Module:ttj-utilities

From Wiktionary, the free dictionary


local export = {}

function export.plural(frame)
    local word = frame.args[1]
    local sg_class = frame.args[2]
    word = word:gsub("^" .. sg_class, "")
   
    return word
end

function export.conj(frame)
    local verb = frame.args[1]
    local initial = frame.args[2]
    local final = frame.args[3]
    verb = verb:gsub("^" .. initial .. "(.*)" .. final .. "$", "%1")
   
    return verb
end


return export