Module:kilta-pron: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 5: Line 5:
local match = mw.ustring.match
local match = mw.ustring.match
local u = mw.ustring.char
local u = mw.ustring.char
local split = mw.text.split
local gsplit = mw.text.gsplit


local A = u(0x0301) -- COMBINING ACUTE
local A = u(0x0301) -- COMBINING ACUTE
Line 23: Line 21:
foo, bar = match(foo, "^."), match(bar, "^.") -- sort out the letter
foo, bar = match(foo, "^."), match(bar, "^.") -- sort out the letter
return foo == bar and true or false
return foo == bar and true or false
end
local function split (input, sep)
    if sep == nil then sep = "%s" end
   
    local t = {}
    for str in gmatch(input, "([^" .. sep .. "]+)") do
table.insert(t, str)
    end
   
    return t
end
end


Navigation menu