Jump to content

Module:Njardarlogar/Nynorsk noun stem

Unchecked
From Wikipedia

Documentation for this module may be created at Module:Njardarlogar/Nynorsk noun stem/doc

local p = {}

function p.find(frame)
    word = frame.args[1]
    length = string.len(word)
    last = string.sub(word, length)
    if last == 'e' then
        stem = string.sub(word, 1, length-1)
    else
        stem = word end
    return stem
end

return p