45,646
edits
No edit summary |
No edit summary |
||
Line 19: | Line 19: | ||
local function plural(word, n) | local function plural(word, n) | ||
local w = split(word, "%s") | local w = split(word, "%s") | ||
if | if tonumber(n) > tonumber(#w) then error("Word index outside bounds.") end | ||
if w[n]:match("[kh]wa$") or w[n]:match("a$") then | if w[n]:match("[kh]wa$") or w[n]:match("a$") then |